The eventTrackingOptions parameter customizes Storyteller's analytics and tracking behavior during SDK initialization. It allows certain features to be disabled based on user privacy choices. It is an object of type StorytellerEventTrackingOptions and by default, all of its properties are enabled:
dataclassStorytellerEventTrackingOptions(valenablePersonalization:Boolean=true,valenableStorytellerTracking:Boolean=true,valenableUserActivityTracking:Boolean=true,valenableAdTracking:Boolean=true,valenableFullVideoAnalytics:Boolean=true,valenableRemoteViewingStore:Boolean=true)// Set during initializationStoryteller.initialize(apiKey="[APIKEY]",userInput=StorytellerUserInput("unique-user-id"),eventTrackingOptions=StorytellerEventTrackingOptions(/*your setup here*/))// Read current settings (read-only)valcurrentOptions=Storyteller.eventTrackingOptions
Note: Starting from version 11.0.0, eventTrackingOptions can only be set during SDK initialization and cannot be modified afterwards. To change these settings, you must call Storyteller.initialize() again with new options.
When enablePersonalization is enabled, user attributes and the user's ID are included on requests to Storyteller's servers to allow us to personalize the content returned
When enableStorytellerTracking is enabled, we will record analytics events on our servers. Some events that are necessary for user functionality are still transmitted (but not stored) when this setting is disabled. Normal content-consumption analytics remain excluded from Storyteller storage, and other events retain their documented behavior.
Starting in 11.7.0, the internal sdkInitialized event is always transmitted and retained for both successful and failed SDK initialization, including when enableStorytellerTracking is disabled. The payload preserves the actual enableStorytellerTracking value and is not delivered through the customer-facing onUserActivityOccurred() callback. It includes the existing hashed user identifier only when enableRemoteViewingStore is enabled; disabling remote viewing omits the identifier.
When enableUserActivityTracking is enabled, we will call the Storyteller delegate's method onUserActivityOccurred(), which allows integrating apps to record our analytics events on their own systems.
When enableAdTracking is disabled, ad-related events will not be tracked through onUserActivityOccurred() Storyteller delegate method and on our servers. Additionally, only necessary fields like Ad Unit Id and Custom Template Id's will be included in GAM requests.
When enableFullVideoAnalytics is enabled, detailed video information (story titles, clip titles, story IDs, clip IDs, etc.) is included in analytics events sent to the onUserActivityOccurred() delegate method.
When disabled, sensitive video data fields are nullified for VPPA (Video Privacy Protection Act) compliance:
storyId, storyTitle, storyDisplayTitle
clipId, clipTitle
pageId, pageTitle, itemTitle, containerTitle
cardId, cardTitle, cardSubtitle
This setting allows integrators to comply with video privacy regulations while still receiving engagement analytics events. All other analytics data (user interactions, durations, event types, etc.) continues to be provided.
When enableRemoteViewingStore is enabled (default), the SDK operates normally with full user activity tracking and remote storage capabilities.
When enableRemoteViewingStore is disabled, the SDK operates in a privacy-enhanced mode designed to address VPPA (Video Privacy Protection Act) compliance concerns:
No User ID Storage: User IDs are never stored locally or sent to backend services
Local-Only User Activity: All user viewing activity is stored locally on the device and never synchronized with remote servers
No Remote User Activity Fetch: The SDK will not attempt to fetch user activity data from remote servers
This mode is particularly useful for clients who need enhanced privacy protection while still maintaining local user experience features like viewing history and recommendations.
Example for enhanced VPPA compliance:
Storyteller.initialize(apiKey="[APIKEY]",userInput=StorytellerUserInput("unique-user-id"),eventTrackingOptions=StorytellerEventTrackingOptions(enablePersonalization=true,enableStorytellerTracking=true,enableUserActivityTracking=true,enableAdTracking=true,enableFullVideoAnalytics=false,// Nullifies sensitive video dataenableRemoteViewingStore=false// Disables remote user ID storage and tracking))
The disabledFunctionalFeatures property allows you to selectively disable specific functional areas of the SDK while maintaining others. This provides granular control over which user interactions are tracked and stored.
When a functional feature is disabled:
The SDK will not make API requests for that particular item (even if enableRemoteViewingStore is true)
The SDK will not store the relevant activity locally on device
The UI will behave as if the feature is disabled from the server
Available functional features that can be disabled:
All - Disables everything including any future cases
Note: This method will be removed in version 11.0.0. Please use eventTrackingOptions instead.
The disableEventTracking() method will disable storing analytics events on Storyteller servers. By default, event tracking is enabled. Note that some events are necessary for user functionality and will still be made (but not stored) when event tracking is disabled.
Event tracking can be enabled again by calling enableEventTracking()
Example:
Storyteller.enableEventTracking()
Storyteller.disableEventTracking()
{"slug": "privacy-and-tracking", "page_title": "Privacy and Tracking", "page_url": "PrivacyAndTracking/", "canonical_url": "/android/PrivacyAndTracking/", "markdown": "# Privacy and Tracking\n\nThe `eventTrackingOptions` parameter customizes Storyteller's analytics and tracking behavior during SDK initialization. It allows certain features to be disabled based on user privacy choices. It is an object of type `StorytellerEventTrackingOptions` and by default, all of its properties are enabled:\n\n```kotlin\n data class StorytellerEventTrackingOptions(\n val enablePersonalization: Boolean = true,\n val enableStorytellerTracking: Boolean = true,\n val enableUserActivityTracking: Boolean = true,\n val enableAdTracking: Boolean = true,\n val enableFullVideoAnalytics: Boolean = true,\n val enableRemoteViewingStore: Boolean = true\n )\n\n // Set during initialization\n Storyteller.initialize(\n apiKey = \"[APIKEY]\",\n userInput = StorytellerUserInput(\"unique-user-id\"),\n eventTrackingOptions = StorytellerEventTrackingOptions(/*your setup here*/)\n )\n\n // Read current settings (read-only)\n val currentOptions = Storyteller.eventTrackingOptions\n```\n\n> **Note:** Starting from version 11.0.0, `eventTrackingOptions` can only be set during SDK initialization and cannot be modified afterwards. To change these settings, you must call `Storyteller.initialize()` again with new options.\n\n## Showcase examples\n\n- [Compose \u2014 privacy toggles (`AccountViewModel`)](https://github.com/getstoryteller/storyteller-showcase-android/blob/main/compose/app/src/main/java/com/getstoryteller/storytellershowcaseapp/ui/features/account/AccountViewModel.kt#L83)\n- [Compose \u2014 stored tracking preferences (`SessionRepositoryImpl`)](https://github.com/getstoryteller/storyteller-showcase-android/blob/main/compose/app/src/main/java/com/getstoryteller/storytellershowcaseapp/data/SessionRepositoryImpl.kt#L47)\n- [XML \u2014 re-initialize with `eventTrackingOptions` (`StorytellerServiceImpl`)](https://github.com/getstoryteller/storyteller-showcase-android/blob/main/xml/app/src/main/java/com/getstoryteller/storytellershowcaseapp/data/StorytellerServiceImpl.kt#L95)\n\n## User Personalization\n\nWhen `enablePersonalization` is enabled, user attributes and the user's ID are included on requests to Storyteller's servers to allow us to personalize the content returned\n\n## Storyteller tracking\n\nWhen `enableStorytellerTracking` is enabled, we will record analytics events on our servers. Some events that are necessary for user functionality are still transmitted (but not stored) when this setting is disabled. Normal content-consumption analytics remain excluded from Storyteller storage, and other events retain their documented behavior.\n\nStarting in `11.7.0`, the internal `sdkInitialized` event is always transmitted and retained for both successful and failed SDK initialization, including when `enableStorytellerTracking` is disabled. The payload preserves the actual `enableStorytellerTracking` value and is not delivered through the customer-facing `onUserActivityOccurred()` callback. It includes the existing hashed user identifier only when `enableRemoteViewingStore` is enabled; disabling remote viewing omits the identifier.\n\n## User Activity tracking\n\nWhen `enableUserActivityTracking` is enabled, we will call the Storyteller delegate's method `onUserActivityOccurred()`, which allows integrating apps to record our analytics events on their own systems.\n\n## Ads tracking\n\nWhen `enableAdTracking` is disabled, ad-related events will not be tracked through `onUserActivityOccurred()` Storyteller delegate method and on our servers. Additionally, only necessary fields like Ad Unit Id and Custom Template Id's will be included in GAM requests.\n\n## Full Video Analytics\n\nWhen `enableFullVideoAnalytics` is enabled, detailed video information (story titles, clip titles, story IDs, clip IDs, etc.) is included in analytics events sent to the `onUserActivityOccurred()` delegate method.\n\nWhen disabled, sensitive video data fields are nullified for VPPA (Video Privacy Protection Act) compliance:\n\n- `storyId`, `storyTitle`, `storyDisplayTitle`\n- `clipId`, `clipTitle`\n- `pageId`, `pageTitle`, `itemTitle`, `containerTitle`\n- `cardId`, `cardTitle`, `cardSubtitle`\n\nThis setting allows integrators to comply with video privacy regulations while still receiving engagement analytics events. All other analytics data (user interactions, durations, event types, etc.) continues to be provided.\n\n## Remote Viewing Store\n\nWhen `enableRemoteViewingStore` is enabled (default), the SDK operates normally with full user activity tracking and remote storage capabilities.\n\nWhen `enableRemoteViewingStore` is disabled, the SDK operates in a privacy-enhanced mode designed to address VPPA (Video Privacy Protection Act) compliance concerns:\n\n- **No User ID Storage**: User IDs are never stored locally or sent to backend services\n- **Local-Only User Activity**: All user viewing activity is stored locally on the device and never synchronized with remote servers\n- **No Remote User Activity Fetch**: The SDK will not attempt to fetch user activity data from remote servers\n\nThis mode is particularly useful for clients who need enhanced privacy protection while still maintaining local user experience features like viewing history and recommendations.\n\nExample for enhanced VPPA compliance:\n\n```kotlin\nStoryteller.initialize(\n apiKey = \"[APIKEY]\",\n userInput = StorytellerUserInput(\"unique-user-id\"),\n eventTrackingOptions = StorytellerEventTrackingOptions(\n enablePersonalization = true,\n enableStorytellerTracking = true,\n enableUserActivityTracking = true,\n enableAdTracking = true,\n enableFullVideoAnalytics = false, // Nullifies sensitive video data\n enableRemoteViewingStore = false // Disables remote user ID storage and tracking\n )\n)\n```\n\n## Disabled Functional Features\n\nThe `disabledFunctionalFeatures` property allows you to selectively disable specific functional areas of the SDK while maintaining others. This provides granular control over which user interactions are tracked and stored.\n\nWhen a functional feature is disabled:\n\n- The SDK will not make API requests for that particular item (even if `enableRemoteViewingStore` is true)\n- The SDK will not store the relevant activity locally on device\n- The UI will behave as if the feature is disabled from the server\n\nAvailable functional features that can be disabled:\n\n- **All** - Disables everything including any future cases\n- **PageReadStatus** - Disables Page Read/Unread feature\n- **ClipViewedStatus** - Disables Clips Viewed/Not Viewed feature\n- **ClipLikes** - Disables Clip Likes and Unlikes\n- **ClipShares** - Disables Clip Share tracking and storage (but not the act of sharing)\n\n### UI Behavior When Features Are Disabled\n\n**Pages**: When PageReadStatus is disabled, all rows act as if Read/Unread tracking is disabled from the server.\n\n**Clips**: When ClipViewedStatus is disabled, all entry points act as if Viewed/Not Viewed tracking is disabled from the server.\n\n**Clip Likes**: When disabled, users can like/unlike clips with UI feedback, but if they swipe away and return, the clip will appear unliked again.\n\n**Clip Shares**: When disabled, users can share clips and see count updates, but if they swipe away and return, the original count will be displayed.\n\nExample configuration:\n\n```kotlin\nStoryteller.initialize(\n apiKey = \"[APIKEY]\",\n userInput = StorytellerUserInput(\"unique-user-id\"),\n eventTrackingOptions = StorytellerEventTrackingOptions(\n enablePersonalization = true,\n enableStorytellerTracking = true,\n enableUserActivityTracking = true,\n enableAdTracking = true,\n enableFullVideoAnalytics = true,\n enableRemoteViewingStore = true,\n disabledFunctionalFeatures = listOf(\n StorytellerDisabledFunctionalFeature.ClipLikes, StorytellerDisabledFunctionalFeature.ClipViewedStatus\n )\n )\n)\n```\n\n## enableEventTracking/disableEventTracking (Legacy)\n\n> Note: This method will be removed in version 11.0.0. Please use `eventTrackingOptions` instead.\n\nThe `disableEventTracking()` method will disable storing analytics events on Storyteller servers. By default, event tracking is enabled. Note that some events are necessary for user functionality and will still be made (but not stored) when event tracking is disabled.\n\nEvent tracking can be enabled again by calling `enableEventTracking()`\n\nExample:\n\n```kotlin\n Storyteller.enableEventTracking()\n```\n\n```kotlin\n Storyteller.disableEventTracking()\n```\n", "copy_markdown_include_header": false, "base_path": "android", "ai_dir": "ai", "missing_payload_behavior": "empty"}