The eventTrackingOptions parameter customizes Storyteller's analytics and tracking behavior. 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.
Important:eventTrackingOptions can only be set during SDK initialization. To configure tracking options, pass a StorytellerEventTrackingOptions object to the initialize method:
// Using custom tracking optionsfinaltrackingOptions=StorytellerEventTrackingOptions(enablePersonalization:false,enableStorytellerTracking:false,enableUserActivityTracking:false,enableAdTracking:false,enableFullVideoAnalytics:false,enableRemoteViewingStore:false,disabledFeatures:[],// empty list means no features disabled);finalinitResult=awaitStoryteller.initialize('your-api-key',externalId:'user-id',eventTrackingOptions:trackingOptions,);if(!initResult.success){// Handle initialization failure}
If you do not need custom tracking options, omit eventTrackingOptions (all tracking enabled):
The Showcase StorytellerService.initialize wraps this pattern so environment secrets, user IDs, and tracking preferences are applied consistently before any widgets render.
The options remain publicly readable via Storyteller.eventTrackingOptions(), but cannot be modified at runtime. To change tracking options after initialization, you must reinitialize the SDK 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. Note that some events are necessary for user functionality and will still be transmitted (but not stored) even when this setting is off.
When enableUserActivityTracking is enabled, the SDK will emit events through the onUserActivityOccurred stream, which allows integrating apps to record our analytics events on their own systems.
Example:
finaltrackingOptions=StorytellerEventTrackingOptions(enableUserActivityTracking:true,// Enable client-side analytics events);awaitStoryteller.initialize('your-api-key',eventTrackingOptions:trackingOptions,);// Listen to analytics eventsStoryteller.onUserActivityOccurred.listen((event){print('Event: ${event.type}');// Forward to your analytics system});
When enableAdTracking is disabled, ad-related events will not be tracked through the onUserActivityOccurred stream and on our servers. Additionally, only necessary fields like Ad Unit Id and Custom Template Id's will be included in GAM requests.
Example:
finaltrackingOptions=StorytellerEventTrackingOptions(enableAdTracking:false,// Disable ad tracking);
When enableFullVideoAnalytics is disabled, sensitive video event data for Story ID, Page ID, Story Title, Page Title, Clip ID, Clip Title, Story Display Title, Item Title, Container Title, Card Id, Card Title and Card Subtitle will not be included in the onUserActivityOccurred stream events.
Example:
finaltrackingOptions=StorytellerEventTrackingOptions(enableFullVideoAnalytics:false,// Exclude sensitive video metadata);
When enableRemoteViewingStore is disabled, user IDs are never stored or sent to backend services, and all user viewing activity is only kept locally on the device. This mode ensures the SDK operates in a privacy-enhanced mode designed to address VPPA (Video Privacy Protection Act) compliance concerns.
Example:
finaltrackingOptions=StorytellerEventTrackingOptions(enableRemoteViewingStore:false,// Keep viewing data local only);
The disabledFeatures property allows you to conditionally disable functional features of the SDK for privacy compliance. When a feature is disabled, the SDK will behave as if that functionality is disabled from the server.
Summary: Controls whether read/unread status is enabled for Story pages.
When disabled, the SDK will not store read/unread behavior for pages. All Lists and Players will act as if read/unread tracking is disabled from the server, meaning users will not see visual indicators of which Stories they have previously viewed.
Summary: Controls whether viewed/not viewed status is enabled for individual Clips.
When disabled, the SDK will not store viewed/not viewed information for Clips. All Lists and Players will act as if viewed/not viewed tracking is disabled from the server, removing visual indicators of previously watched content.
Summary: Controls whether Poll voting responses are persistently stored.
When disabled, users can still interact with Polls and see immediate UI updates when they vote, but their votes are not persistently stored. If they navigate away and return to the same Poll, they can vote again. Since this is coupled with disabled Storyteller Analytics, their votes will not contribute to overall Poll statistics.
Summary: Controls whether Trivia Quiz responses and progress are persistently stored.
When disabled, users can still answer trivia questions and see immediate UI feedback, but their answers are not persistently stored. If they navigate away and return to the same Quiz, they can answer questions again. The results page will be hidden since the SDK is not allowed to display persistent Quiz results.
Summary: Controls whether Clip like/unlike interactions are persistently stored.
When disabled, users can still tap to like/unlike Clips and see immediate UI updates, but these interactions are not persistently stored. If they swipe away and return to the same Clip, it will appear in its original unliked state.
Summary: Disables Clip Share tracking and storage (but not the sharing action itself).
When disabled, users can still tap on Share Clip button and see immediate UI updates, but this interaction is not persistently stored. If they swipe away and returns to the same Clip, the original share count will be displayed.
{"slug": "privacy-and-tracking", "page_title": "Privacy and Tracking", "page_url": "PrivacyAndTracking/", "canonical_url": "/flutter/PrivacyAndTracking/", "markdown": "# Privacy and Tracking\n\nThe `eventTrackingOptions` parameter customizes Storyteller's analytics and tracking behavior. 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**Important:** `eventTrackingOptions` can only be set during SDK initialization. To configure tracking options, pass a `StorytellerEventTrackingOptions` object to the `initialize` method:\n\n```dart\n// Using custom tracking options\nfinal trackingOptions = StorytellerEventTrackingOptions(\n enablePersonalization: false,\n enableStorytellerTracking: false,\n enableUserActivityTracking: false,\n enableAdTracking: false,\n enableFullVideoAnalytics: false,\n enableRemoteViewingStore: false,\n disabledFeatures: [], // empty list means no features disabled\n);\n\nfinal initResult = await Storyteller.initialize(\n 'your-api-key',\n externalId: 'user-id',\n eventTrackingOptions: trackingOptions,\n);\n\nif (!initResult.success) {\n // Handle initialization failure\n}\n```\n\nIf you do not need custom tracking options, omit `eventTrackingOptions` (all tracking enabled):\n\n```dart\nawait Storyteller.initialize(\n 'your-api-key',\n externalId: 'user-id',\n);\n```\n\nThe Showcase [`StorytellerService.initialize`](https://github.com/getstoryteller/storyteller-showcase-flutter/blob/main/lib/services/storyteller_service.dart#L73) wraps this pattern so environment secrets, user IDs, and tracking preferences are applied consistently before any widgets render.\n\nThe options remain publicly readable via `Storyteller.eventTrackingOptions()`, but cannot be modified at runtime. To change tracking options after initialization, you must reinitialize the SDK with new options.\n\n**Example: Reading Current Tracking Options**\n\n```dart\nfinal options = await Storyteller.eventTrackingOptions();\nprint('Personalization enabled: ${options.enablePersonalization}');\nprint('Ad tracking enabled: ${options.enableAdTracking}');\nprint('Disabled features: ${options.disabledFeatures}');\n```\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**Example:**\n```dart\nfinal trackingOptions = StorytellerEventTrackingOptions(\n enablePersonalization: true, // Enable personalized content\n);\n\nawait Storyteller.initialize(\n 'your-api-key',\n externalId: 'user-123',\n eventTrackingOptions: trackingOptions,\n);\n```\n\n## Storyteller Tracking\n\nWhen `enableStorytellerTracking` is enabled, we will record analytics events on our servers. *Note* that some events are necessary for user functionality and will still be transmitted (but not stored) even when this setting is off.\n\n**Example:**\n```dart\nfinal trackingOptions = StorytellerEventTrackingOptions(\n enableStorytellerTracking: false, // Disable server-side analytics\n);\n```\n\n## User Activity Tracking\n\nWhen `enableUserActivityTracking` is enabled, the SDK will emit events through the `onUserActivityOccurred` stream, which allows integrating apps to record our analytics events on their own systems.\n\n**Example:**\n```dart\nfinal trackingOptions = StorytellerEventTrackingOptions(\n enableUserActivityTracking: true, // Enable client-side analytics events\n);\n\nawait Storyteller.initialize(\n 'your-api-key',\n eventTrackingOptions: trackingOptions,\n);\n\n// Listen to analytics events\nStoryteller.onUserActivityOccurred.listen((event) {\n print('Event: ${event.type}');\n // Forward to your analytics system\n});\n```\n\n## Ads Tracking\n\nWhen `enableAdTracking` is disabled, ad-related events will not be tracked through the `onUserActivityOccurred` stream 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**Example:**\n```dart\nfinal trackingOptions = StorytellerEventTrackingOptions(\n enableAdTracking: false, // Disable ad tracking\n);\n```\n\n## Videos Tracking\n\nWhen `enableFullVideoAnalytics` is disabled, sensitive video event data for `Story ID`, `Page ID`, `Story Title`, `Page Title`, `Clip ID`, `Clip Title`, `Story Display Title`, `Item Title`, `Container Title`, `Card Id`, `Card Title` and `Card Subtitle` will not be included in the `onUserActivityOccurred` stream events.\n\n**Example:**\n```dart\nfinal trackingOptions = StorytellerEventTrackingOptions(\n enableFullVideoAnalytics: false, // Exclude sensitive video metadata\n);\n```\n\n## Remote Viewing Store\n\nWhen `enableRemoteViewingStore` is disabled, user IDs are never stored or sent to backend services, and all user viewing activity is only kept locally on the device. This mode ensures the SDK operates in a privacy-enhanced mode designed to address VPPA (Video Privacy Protection Act) compliance concerns.\n\n**Example:**\n```dart\nfinal trackingOptions = StorytellerEventTrackingOptions(\n enableRemoteViewingStore: false, // Keep viewing data local only\n);\n```\n\n## Independent Functional Behavior Toggles\n\nThe `disabledFeatures` property allows you to conditionally disable functional features of the SDK for privacy compliance. When a feature is disabled, the SDK will behave as if that functionality is disabled from the server.\n\nAvailable features to disable:\n\n- `'pageReadStatus'`\n- `'clipViewedStatus'`\n- `'pollVotes'`\n- `'triviaQuizAnswers'`\n- `'clipLikes'`\n- `'clipShares'`\n\n**Example:**\n```dart\nfinal trackingOptions = StorytellerEventTrackingOptions(\n disabledFeatures: ['clipLikes', 'clipShares', 'pollVotes'],\n);\n```\n\n### `pageReadStatus`\n\n**Summary**: Controls whether read/unread status is enabled for Story pages.\n\nWhen disabled, the SDK will not store read/unread behavior for pages. All Lists and Players will act as if read/unread tracking is disabled from the server, meaning users will not see visual indicators of which Stories they have previously viewed.\n\n**Example:**\n```dart\nfinal trackingOptions = StorytellerEventTrackingOptions(\n disabledFeatures: ['pageReadStatus'],\n);\n```\n\n### `clipViewedStatus`\n\n**Summary**: Controls whether viewed/not viewed status is enabled for individual Clips.\n\nWhen disabled, the SDK will not store viewed/not viewed information for Clips. All Lists and Players will act as if viewed/not viewed tracking is disabled from the server, removing visual indicators of previously watched content.\n\n**Example:**\n```dart\nfinal trackingOptions = StorytellerEventTrackingOptions(\n disabledFeatures: ['clipViewedStatus'],\n);\n```\n\n### `pollVotes`\n\n**Summary**: Controls whether Poll voting responses are persistently stored.\n\nWhen disabled, users can still interact with Polls and see immediate UI updates when they vote, but their votes are not persistently stored. If they navigate away and return to the same Poll, they can vote again. Since this is coupled with disabled Storyteller Analytics, their votes will not contribute to overall Poll statistics.\n\n**Example:**\n```dart\nfinal trackingOptions = StorytellerEventTrackingOptions(\n disabledFeatures: ['pollVotes'],\n);\n```\n\n### `triviaQuizAnswers`\n\n**Summary**: Controls whether Trivia Quiz responses and progress are persistently stored.\n\nWhen disabled, users can still answer trivia questions and see immediate UI feedback, but their answers are not persistently stored. If they navigate away and return to the same Quiz, they can answer questions again. The results page will be hidden since the SDK is not allowed to display persistent Quiz results.\n\n**Example:**\n```dart\nfinal trackingOptions = StorytellerEventTrackingOptions(\n disabledFeatures: ['triviaQuizAnswers'],\n);\n```\n\n### `clipLikes`\n\n**Summary**: Controls whether Clip like/unlike interactions are persistently stored.\n\nWhen disabled, users can still tap to like/unlike Clips and see immediate UI updates, but these interactions are not persistently stored. If they swipe away and return to the same Clip, it will appear in its original unliked state.\n\n**Example:**\n```dart\nfinal trackingOptions = StorytellerEventTrackingOptions(\n disabledFeatures: ['clipLikes'],\n);\n```\n\n### `clipShares`\n\n**Summary**: Disables Clip Share tracking and storage (but not the sharing action itself).\n\nWhen disabled, users can still tap on Share Clip button and see immediate UI updates, but this interaction is not persistently stored. If they swipe away and returns to the same Clip, the original share count will be displayed.\n\n**Example:**\n```dart\nfinal trackingOptions = StorytellerEventTrackingOptions(\n disabledFeatures: ['clipShares'],\n);\n```\n", "copy_markdown_include_header": false, "base_path": "", "ai_dir": "ai", "missing_payload_behavior": "empty"}