-
Notifications
You must be signed in to change notification settings - Fork 3
feat(expo): update for 1.2.0 #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
4d0fedf
6927347
4e16769
b0ad551
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -411,18 +411,35 @@ Superwall.configure( | |
|
|
||
| :::expo | ||
|
|
||
| Expo currently uses `isExternalDataCollectionEnabled`. Setting it to `false` suppresses user-initiated tracking, trigger-fire events, and user-attribute updates while keeping internal Superwall event collection enabled. | ||
| On Expo SDK `1.2.0` and later, use `eventTrackingBehavior`: | ||
|
|
||
| | Behavior | What Superwall sends | | ||
| | --- | --- | | ||
| | `EventTrackingBehavior.All` | All SDK event collection is enabled. This is the default. | | ||
| | `EventTrackingBehavior.SuperwallOnly` | Internal Superwall events continue to be sent, but user-initiated `Superwall.track(...)` calls, trigger-fire events, and user-attribute updates are suppressed. | | ||
| | `EventTrackingBehavior.None` | No SDK events are sent to Superwall. Paywalls still work because paywall logic runs on device, but dashboard analytics, attribution matching, and audience rules that depend on `acquisition_*` attributes will not receive this event data. | | ||
|
|
||
| Set the initial behavior before calling `configure()`: | ||
|
|
||
| ```typescript | ||
| const options = SuperwallOptions() | ||
| options.isExternalDataCollectionEnabled = false | ||
| options.eventTrackingBehavior = EventTrackingBehavior.None | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For the Expo Provider/hook API, Useful? React with 👍 / 👎. |
||
|
|
||
| Superwall.configure( | ||
| "MY_API_KEY", | ||
| null, | ||
| options: options | ||
| ); | ||
| ``` | ||
|
|
||
| You can also change the behavior at runtime after the SDK is configured. This is useful when a user changes a privacy or consent setting in your app. | ||
|
|
||
| ```typescript | ||
| await Superwall.shared.setEventTrackingBehavior(EventTrackingBehavior.None) | ||
| ``` | ||
|
|
||
| `isExternalDataCollectionEnabled` is deprecated on Expo SDK `1.2.0` and later. If older code sets it to `false`, the SDK maps that to `SuperwallOnly`, not `None`. Use `None` when your app needs to stop SDK event collection entirely. | ||
|
|
||
| ::: | ||
|
|
||
| ### Automatically Dismissing the Paywall | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.