When a visitor is using your iOS app, Android app, or website, and your app or website uses an Iterable SDK with Unknown User Activation enabled, you must call the following SDK methods in order for Iterable's SDK to save user updates, cart update events, purchase events, custom events, and your users' consent timestamps to the app's or browser's local storage.
IMPORTANT
Call these methods only after collecting user consent for local data tracking. Securing consent is your responsibility.
WARNING
Calling setVisitorUsageTracked(true) clears any previously stored local visitor
data (events, user updates, and session data) before starting fresh tracking.
If your app calls this method on each launch, any visitor data stored from a
previous session that was not yet synced to Iterable will be lost.
For the iOS SDK, call the
IterableAPI.setVisitorUsageTracked(isVisitorUsageTracked: true)method. To disable local data storage and clear saved data, callIterableAPI.setVisitorUsageTracked(isVisitorUsageTracked: false).For the Android SDK, call
IterableApi.getInstance().setVisitorUsageTracked(true). To disable local data storage and clear saved data, callIterableApi.getInstance().setVisitorUsageTracked(false).For the Web SDK, call
setVisitorUsageTracked(true). To disable local data storage and clear saved data, callsetVisitorUsageTracked(false).
Additionally, the SDK stops locally storing user updates, cart update events, purchase events, and custom events when:
The unidentified visitor satisfies the unknown user profile creation criteria defined in your Iterable project, causing them to receive an unknown user profile in your Iterable project.
You identify the visitor by email or a userId, which creates a new user profile for them in Iterable or associates them with an existing user profile.
In these cases, user data that's already been saved locally is synced to the appropriate user profile in Iterable (unknown or known). Future updates are saved to Iterable, too.