Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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" />
21 changes: 19 additions & 2 deletions content/shared/configuring/using-superwalloptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

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 string literals for Expo event tracking behavior

For the Expo Provider/hook API, eventTrackingBehavior is a string union ("all" | "superwallOnly" | "none") and the package re-exports EventTrackingBehavior only as a type, not a runtime enum value. Copying this snippet therefore fails to compile with the normal expo-superwall import, and the same bad enum value is repeated for the runtime setter below; use string literals such as "none", or explicitly document a supported compat import if that is the intended 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
Expand Down
Loading