RTN Docs

React Native SDK · Preview

Consent and privacy

Connect your consent dialog, manage purpose-level decisions and control advertising identifiers on React Native.

Preview: planned API

The React Native SDK is in development and not published yet. This page describes the API we are building so you can plan your integration. Package names, signatures and defaults may still change before the first release.

Without a stored decision or a consent option the SDK starts as granted, like the Web SDK. If you ask for consent first, initialize with a pending state and update it when the customer decides. Decisions are stored on the device.

// When the visitor decides in your consent dialog
await RTN.setConsent('granted');

// Purpose-level decisions
await RTN.setConsentPurpose('advertising', 'granted');
const ads = await RTN.getConsentPurpose('advertising');

// Stop and restart collection without losing identity
await RTN.pause();
await RTN.resume();
PurposeControls
analyticsEvent collection and delivery. Set by setConsent.
personalizationUsing events for personalized messages and recommendations
advertisingAdvertising identifiers and syncing the customer to ad audiences
audiencesIncluding the customer in segments shared with ad platforms
probabilistic_attributionMatching installs without a deterministic identifier

While analytics is pending, events are kept on the device and sent once it is granted. When it is denied, queued events are deleted and nothing is collected.

Advertising identifiers

Advertising identifiers follow the native rules: the Google Advertising ID on Android and the IDFA on iOS only after RTN.requestTrackingAuthorization() resolves to authorized. On Android that call resolves immediately with authorized.

Data deletion

reset clears the known customer and starts a new anonymous identity on the device. To erase a customer's data, use the deletion request in the dashboard or the server API; the SDK does not delete server-side data.

On this page