Set up the SDK
The justtrack SDK provides powerful tracking capabilities for attribution, events, and more.
This guide shows you how to add the justtrack SDK to your app.
Add the SDK dependency
You can install the justtrack SDK for React Native from npm using:
npm install react-native-justtrack-sdk --save
Find your API token
For the next step, you'll need to obtain an API token. Follow our guide to find your API token.
Instantiate the SDK
You first have to initialize the SDK with your API token:
import * as JustTrackSdk from 'react-native-justtrack-sdk';
await new JustTrackSdk.JusttrackSdkBuilder(apiToken).initialize();
Only after initializing the SDK will you be able to call the methods to attribute the current user or send user events.
Ad tracking transparency for iOS
Starting with iOS 14, the justtrack SDK can only access the IDFA if the user allowed the app to track them. The justtrack SDK doesn't request this permission but can (albeit somewhat limited) still attribute the user to the correct campaign. To improve this precision, you can ask the user for permission to track them.
That’s it!
Once instantiated, JustTrackSdk is ready to attribute your users.
See our guide on tracking events next.