Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions content/docs/expo/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ description: "Release notes for the Superwall Expo SDK"

# Changelog

## 1.2.0

### Minor Changes

- 694c1b1: Update native SDKs (iOS 4.16.1, Android 2.7.20) and add `eventTrackingBehavior` (deprecates `isExternalDataCollectionEnabled`), the `singularDeviceId` integration attribute, a runtime `setEventTrackingBehavior`, and `getStoreFrontCountryCode()`.
Comment thread
dcrawbuck marked this conversation as resolved.

## 1.1.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion content/docs/expo/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ If you have feedback on any of our docs, please leave a rating and message at th

If you have any issues please [open an issue on GitHub](https://github.com/superwall/expo-superwall/issues).

<SdkLatestVersion version="v1.1.6" repoUrl="https://github.com/superwall/expo-superwall" />
<SdkLatestVersion version="v1.2.0" repoUrl="https://github.com/superwall/expo-superwall" />
8 changes: 8 additions & 0 deletions content/docs/expo/sdk-reference/hooks/useSuperwall.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ The hook returns an object representing the Superwall store. If a `selector` fun
type: "(level: string) => Promise<void>",
description: "Sets the SDK log level (debug, info, warn, error, none).",
},
setEventTrackingBehavior: {
type: "(behavior: EventTrackingBehavior) => Promise<void>",
description: "Sets which events Superwall tracks at runtime (\"all\", \"superwallOnly\", or \"none\"), for GDPR/data-collection control.",
},
setIntegrationAttributes: {
type: "(attributes: IntegrationAttributes) => Promise<void>",
description: "Sets third-party integration identifiers, including `appstackId` for Appstack.",
Expand All @@ -106,6 +110,10 @@ The hook returns an object representing the Superwall store. If a `selector` fun
type: "() => Promise<Record<string, any>>",
description: "Returns device attributes from the native SDK.",
},
getStoreFrontCountryCode: {
type: "() => Promise<string | undefined>",
description: "Retrieves the App Store / Play Store storefront country code for the current device.",
},
getEntitlements: {
type: "() => Promise<EntitlementsInfo>",
description: "Fetches the user's entitlement snapshot, including active and inactive entitlements, plus all known entitlements when exposed by the native bridge.",
Expand Down
2 changes: 1 addition & 1 deletion content/docs/expo/sdk-reference/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ If you have feedback on any of our docs, please leave a rating and message at th

If you have any issues with the SDK, please [open an issue on GitHub](https://github.com/superwall/expo-superwall/issues).

<SdkLatestVersion version="v1.1.6" repoUrl="https://github.com/superwall/expo-superwall" />
<SdkLatestVersion version="v1.2.0" repoUrl="https://github.com/superwall/expo-superwall" />
32 changes: 25 additions & 7 deletions content/shared/configuring/using-superwalloptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -411,18 +411,36 @@ 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`:

`eventTrackingBehavior` is a string union — pass one of the following string values:

| Behavior | What Superwall sends |
| --- | --- |
| `"all"` | All SDK event collection is enabled. This is the default. |
| `"superwallOnly"` | Internal Superwall events continue to be sent, but user-initiated `Superwall.track(...)` calls, trigger-fire events, and user-attribute updates are suppressed. |
| `"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
const options = new SuperwallOptions()
options.eventTrackingBehavior = "none"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use an object literal for Expo event tracking options

Fresh evidence is that the updated example now uses string literals while still instantiating new SuperwallOptions(). For the non-compat Expo SDK, eventTrackingBehavior is a string-union field on PartialSuperwallOptions, but SuperwallOptions is exported only as a type, so this block cannot compile when copied from the Expo guide; use an options object literal such as { eventTrackingBehavior: "none" } with <SuperwallProvider>/useSuperwall, or make the whole snippet explicitly compat with the compat import/API.

Useful? React with 👍 / 👎.


Superwall.configure(
"MY_API_KEY",
options: options
);
Superwall.configure({
apiKey: "MY_API_KEY",
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("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
Expand Down
Loading