Lesson 8

How to track events in React Native

Track events, identify users, manage consent and run personalization in React Native apps on iOS and Android.

Video comingThe video is being filmed. The steps below are the whole lesson.

In this lesson

  1. 1React Native: npm install @intempt-technologies/react-native, run cd ios && pod install, then const intempt = await init({ apiKey, orgId, projectId, sourceId }) before the first screen.
  2. 2React Native: await intempt.identify('user-id', { userAttributes }) then await intempt.track('Event', { ... }).
Read the reference docs for this lesson

Setup checklist

The 18 steps to ship the SDK, from your first line of code to an identified event in Live. Tick them off as you go; your ticks stay in this browser.

Open the setup checklist (PDF)

0 of 18 ticked

You are done when

  • Your custom event appears on Events, Live in the console.
  • The event is attached to the identified user's profile, not an anonymous one.
  • Browser only: tested on a real domain, since tracking is blocked on localhost.
  • Server SDKs: flush or close ran so buffered events were sent before the process exited.

Your tech stack and tools

The core stack (everything you actually need)

Highly recommended optional upgrades that level up your work

Every SDK is free. Your first 100K events a month are included on every plan.