Skip to main content
Mobile apps use a native SDK. Do not load the web snippet inside the app as a replacement for an SDK.

Choose the SDK

  • Use the iOS SDK for native Swift apps.
  • Use the React Native SDK for React Native and Expo.
  • Add the Web SDK too when campaigns land on a website before the app store.

Setup order

1

Add the package

Follow the package-manager instructions in the SDK reference and use the workspace ID from Settings → Install.
2

Initialize once

Initialize near application startup, before tracking screens or product events. Do not initialize again on every view.
3

Track navigation

Send a screen event when the visible screen changes. React Native apps should use the documented React Navigation or Expo Router integration.
4

Identify after sign-in

Use the same stable user ID used by your backend and billing provider.
5

Test a clean install journey

Launch a development build, open a screen, identify a test user, and trigger one product event.

What to verify

Open Events and confirm the app session, screen, identity, and custom event use the expected source and identifiers. Open Users and verify those events belong to one test customer. If you use RevenueCat or Superwall, pass the Datalyr identity fields using the SDK helper documented for your platform. This is what lets subscription events join the app journey.

Common failures

  • No events: initialization did not run, the workspace ID is wrong, or the app was not rebuilt after installation.
  • Duplicate screens: both automatic navigation tracking and manual screen tracking are enabled.
  • Revenue is unassigned: the app user ID and billing-provider identity were never connected.
  • Only development works: the production target is missing the package or initialization configuration.
Continue with the mobile use case for web-to-app attribution, subscriptions, and campaign setup.