This page lists the enums, content URL types, event data, tile data, ad request data, followed category types, theme classes, and server rendering helpers that the SDK exports. Theme properties are covered in Customize themes, and event properties in the analytics event pages.
Every enum value is a string equal to its member name. In TypeScript, pass the enum member, such as Storyteller.UiStyle.dark. In JavaScript, you can also pass the string, such as 'dark'.
Selects the light or dark theme of a UiTheme. auto follows the system color scheme. Set it with configuration.uiStyle or the data-ui-style container attribute. See uiStyle.
The followableCategoryLimitShown, followableCategoryLimitActionButtonTapped, and followableCategoryLimitDismissed events reach onUserActivityOccurred only. The SDK doesn't send them to Storyteller analytics.
Version 11.1.0 added tileVisible, clipVideoHeartbeat, clipVideoQuartile, scrubbedClip, mutedClip, unmutedClip, followableCategoryTapped, followCategory, unfollowCategory, and the three followableCategoryLimit events. Update exhaustive switch statements over ActivityType.
These values are deprecated or unused:
completedPage and skippedPage are deprecated. The Story player still records them, but the event pages don't list their fields
swipedUp, viewedPage, completedAd, swipedUpOnAd, previousAd, impression, readyToPlay, mediaStarted, bufferingStarted, bufferingEnded. The SDK does not record these events
See OpenedReason for each value. openCollection accepts OpenedReason.deepLink as its third argument. Without it, the first Clip reports deepLink, unless the open lands on a Category (destination.categoryId): then it reports categoryListTap. With it, a Category open reports deepLink too. openDeepLink always reports deepLink.
Version 11.1.0 added reloadMethod, which Clips events report after a feed reloads. Update exhaustive switch statements over OpenedReason.
The items of eventTrackingOptions.disabledFunctionalFeatures. all disables every item. See Disabled functional features.
Note
The npm package exports this enum at runtime. The CDN script does not, so Storyteller.StorytellerTrackedFunctionalFeature is undefined there. Pass the string values instead, such as ['pageReadStatus'].
Reads a Storyteller content URL or player hash and returns its destination as a DeepLink. It makes no requests and doesn't change the page. Call it as Storyteller.parseDeepLink, or import it by name.
Parameter
Type
Required
Default
Description
url
string
Yes
None
A Storyteller content URL, or a player hash such as #clips/collection-id
The result of parseDeepLink. Check type to find the destination. The parser URL-decodes each ID once, so an ID that was encoded twice keeps one level of encoding.
Pages: the result keeps the link's answerId. openDeepLink opens the Page. When the Page can't load and the link has no categoryId, it opens the fallbackStoryId Story instead
Categories in hashes: Story and Page hashes name the category with the categoryId query parameter, and collection hashes with category. When a hash names both content and a category, openDeepLink keeps both. It rejects when a Story isn't in that category
Clip categories: openDeepLink rejects a clipCategory link without a collectionId
Starting feed: initialFeed is 'following' when the URL has feed=following. The parameter name and value ignore case. When openDeepLink opens the link, a Clip or category in it takes priority over initialFeed
The options of openDeepLink. context is your own placement data for the events of this opening. It replaces the context configured on the view that opens the content. When you leave it out, the events carry the view's configured context. Events from a player that the SDK creates, because no view on the page has the content, carry none. The SDK passes context only to your callbacks.
clipId, clipTitle (string, or null when enableFullVideoAnalytics is false); collection (string); clipActionText, clipActionUrl (string or null); clipIndex, clipsViewed, loopsViewed (number); clipHasAction (boolean); clipFeedType (ClipFeedType: 'default', 'forYou', or 'following'), also set on Clip ad events
Captions
captionsEnabled (boolean)
Clip action taps
actionClass ('primary' or 'secondary'); actionIndex (number, present for secondary actions only)
CMS metadata
metadata (Record<string, string> or null): Story and Clip tile metadata, and active Clip metadata on player callbacks
List tiles
tileIndex (number)
Category follows
categoryType, location (string); followableCategoryLimitDialogue, followableCategoryLimitActionText, followableCategoryLimitActionUrl (string or null)
On a Clip action tap, clipActionText and clipActionUrl describe the button the user tapped. actionIndex is the button's one-based position among the secondary actions set in the CMS. A Clip with one secondary action reports 1.
shareMethod is the Page's share setting from the Storyteller CMS. With 'share' or 'shareMedia', the Story player downloads the Page's media file. With 'shareLink', it shares a link to the Page. Clip share events report ''.
The SDK passes actionClass, actionIndex, and Clip CMS metadata only to your callbacks. It doesn't add them to the events it sends to Storyteller. See Clip metadata for when metadata is absent, empty, or null.
Clip playback events also use these optional fields: quartile?: 25 | 50 | 75, startPosition?: number, endPosition?: number, scrubDirection?: 'forward' | 'backward', completionType?: 'natural', and isMuted?: boolean. Seek positions and the heartbeat durationViewed are in milliseconds. See Clip events for when each event fires.
The SDK exports UserActivityData as a class. The callback receives a plain object with these fields.
The type of clipFeedType on Clip and Clip ad events: forYou or following in a Clips player with the For You and Following tabs, and default in any other player. See Clip feed type.
The tile argument of onTileTapped. It is a StorytellerStoryTileData for a Story tile and a StorytellerClipTileData for a Clip tile. Check type to tell them apart.
Categories of the next Clip. nextClip is absent when no next Clip exists
clip.id
Always ''. Deprecated
The SDK also calls getAdConfig with an empty clip.categories and no nextClip, to check that you return a config with a slot before it places Clip ads. Make your callback handle an empty list.
The return value of getBottomBannerAdConfig: a Google Ad Manager display unit for the Clips bottom banner. AdTargeting is the same type that getAdConfig uses.
Field
Type
Required
Description
slot
string
Yes
Ad unit path, in the form /[NETWORK_CODE]/[UNIT_CODE]. Use a banner unit, not the unit of your fullscreen ads
size
[number, number] or [number, number][]
Yes
One [width, height] in CSS pixels, or every size the unit accepts, such as [[320, 50], [300, 50]]. Widths and heights are positive whole numbers, and heights are at most 80
customTargeting
AdTargeting
No
Key-value pairs for the banner request. They override the SDK keys stCollection and stClipCategories. The SDK drops them when enableAdTracking is false
type
'doubleclick'
No
Ad server type. If you set it, it must be 'doubleclick'
The config needs a slot and a size. The SDK shows no banner when slot is empty, when any size isn't valid, or when you set type to a value other than 'doubleclick'.
true when the current user follows the category. The check includes the type, so two categories with the same external ID but different types stay independent
Holds a light and a darkTheme. The constructor builds both from baseTheme, and unset properties keep their defaults. The view's UiStyle decides which theme applies. See Customize themes.
Exported as Theme. One color scheme of a theme. The constructor copies the properties of theme over the defaults. The SDK sets isDark when it builds the dark theme. toPlainObject() returns the same instance, not a copy.
A singleton instance. getStories loads the Stories of the given categories with the API key from initialize. It keeps only Stories that have a Web Story URL: a standalone page for the Story in Google's Web Stories format. render returns a hidden <amp-story-player> element, the AMP element that embeds Web Stories, with a link, poster image, and title for each Story. No task guide covers these methods.
The SDK also exports these names. No guide covers them, and integrations do not need them:
Export
Kind
Notes
Story
Class
Story data model from the Stories API. No public SDK method or callback returns it in 11.1.0
QuizRenderer
Instance
Renders Quiz questions and results inside a Story page document. The SDK's Story page script uses its own copy
QuizApiService
Instance
Loads Quiz data for Story pages. The SDK's Story page script uses its own copy
{"slug": "reference-types", "page_title": "Types and Enums", "page_url": "reference/types/", "canonical_url": "/web/reference/types/", "markdown": "# Types and enums\n\nThis page lists the enums, content URL types, event data, tile data, ad request data, followed category types, theme classes, and server rendering helpers that the SDK exports. Theme properties are covered in [Customize themes](../Themes.md), and event properties in the [analytics event pages](../Analytics.md#event-types).\n\n## Enums\n\nEvery enum value is a string equal to its member name. In TypeScript, pass the enum member, such as `Storyteller.UiStyle.dark`. In JavaScript, you can also pass the string, such as `'dark'`.\n\n### `UiStyle`\n\n```typescript\nenum UiStyle {\n auto = 'auto',\n light = 'light',\n dark = 'dark',\n}\n```\n\nSelects the `light` or `dark` theme of a [`UiTheme`](#uitheme). `auto` follows the system color scheme. Set it with [`configuration.uiStyle`](views.md#ilistconfiguration) or the `data-ui-style` container attribute. See [uiStyle](../StorytellerListView.md#uistyle).\n\n### `CellType`\n\n```typescript\nenum StorytellerListViewCellType {\n round = 'round',\n square = 'square',\n}\n```\n\nExported as `CellType`. Sets the tile shape of a row. The default is `square`. See [cellType](../StorytellerRowView.md#celltype).\n\n### `ActivityType`\n\nThe `type` argument of [`onUserActivityOccurred`](callbacks.md#onuseractivityoccurred). The event pages list when each event fires and its properties:\n\n| Area | Values | Reference |\n| --- | --- | --- |\n| SDK | `sdkInitialized` | [SDK initialization](../Analytics.md#sdk-initialization) |\n| Lists | `tileVisible` | [Tile visibility](../Analytics.md#tile-visibility) |\n| Stories and Clips | `actionButtonTapped`, `shareButtonTapped`, `shareSuccess` | [Story events](../analytics/StoryEvents.md), [Clip events](../analytics/ClipEvents.md) |\n| Stories | `openedStory`, `dismissedStory`, `skippedStory`, `completedStory`, `openedPage`, `previousPage`, `previousStory` | [Story events](../analytics/StoryEvents.md) |\n| Story captions | `enabledStoryCaptions`, `disabledStoryCaptions` | [Story caption events](../analytics/StoryEvents.md#caption-state-and-events) |\n| Polls | `votedPoll` | [Poll events](../analytics/PollEvents.md) |\n| Quizzes | `triviaQuizQuestionAnswered`, `triviaQuizCompleted` | [Quiz events](../analytics/QuizEvents.md) |\n| Ads | `openedAd`, `dismissedAd`, `pausedAdPage`, `resumedAdPage`, `finishedAd`, `skippedAd`, `adActionButtonTapped`, `viewedAdPageFirstQuartile`, `viewedAdPageMidpoint`, `viewedAdPageThirdQuartile`, `viewedAdPageComplete` | [Ad events](../analytics/AdEvents.md) |\n| Clips | `openedClip`, `dismissedClip`, `finishedClip`, `nextClip`, `previousClip`, `completedLoop`, `clipVideoHeartbeat`, `clipVideoQuartile`, `scrubbedClip`, `mutedClip`, `unmutedClip`, `pausedClip`, `resumedClip`, `likedClip`, `unlikedClip`, `openedCategory`, `dismissedCategory`, `followableCategoryTapped` | [Clip events](../analytics/ClipEvents.md) |\n| Clip captions | `enabledClipCaptions`, `disabledClipCaptions` | [Clip caption events](../analytics/ClipEvents.md#caption-state-and-events) |\n| Category follows | `followCategory`, `unfollowCategory`, `followableCategoryLimitShown`, `followableCategoryLimitActionButtonTapped`, `followableCategoryLimitDismissed` | [Category follow events](../analytics/ClipEvents.md#follow-category) |\n\nThe `followableCategoryLimitShown`, `followableCategoryLimitActionButtonTapped`, and `followableCategoryLimitDismissed` events reach `onUserActivityOccurred` only. The SDK doesn't send them to Storyteller analytics.\n\nVersion 11.1.0 added `tileVisible`, `clipVideoHeartbeat`, `clipVideoQuartile`, `scrubbedClip`, `mutedClip`, `unmutedClip`, `followableCategoryTapped`, `followCategory`, `unfollowCategory`, and the three `followableCategoryLimit` events. Update exhaustive `switch` statements over `ActivityType`.\n\nThese values are deprecated or unused:\n\n- `completedPage` and `skippedPage` are deprecated. The Story player still records them, but the event pages don't list their fields\n- `swipedUp`, `viewedPage`, `completedAd`, `swipedUpOnAd`, `previousAd`, `impression`, `readyToPlay`, `mediaStarted`, `bufferingStarted`, `bufferingEnded`. The SDK does not record these events\n\n### `OpenedReason`\n\nThe `openedReason` property of open events:\n\n| Area | Values |\n| --- | --- |\n| Stories | `storyListTap`, `deepLink`, `swipe`, `automaticPlayback`, `tap` |\n| Clips | `clipListTap`, `categoryListTap`, `categoryBackTap`, `deepLink`, `reloadMethod` |\n\nSee [OpenedReason](../Analytics.md#openedreason) for each value. [`openCollection`](storyteller.md#opencollection) accepts `OpenedReason.deepLink` as its third argument. Without it, the first Clip reports `deepLink`, unless the open lands on a Category (`destination.categoryId`): then it reports `categoryListTap`. With it, a Category open reports `deepLink` too. [`openDeepLink`](storyteller.md#opendeeplink) always reports `deepLink`.\n\nVersion 11.1.0 added `reloadMethod`, which Clips events report after a feed reloads. Update exhaustive `switch` statements over `OpenedReason`.\n\n### `DismissedReason`\n\nThe `dismissedReason` property of dismiss events:\n\n| Area | Values |\n| --- | --- |\n| Stories and Clips | `backgroundTapped`, `instanceMethod`, `windowUnload` |\n| Stories | `closeButtonTapped`, `swipedDown`, `swipedFirstStory`, `swipedFinalStory`, `skippedFinalPage`, `completedFinalPage`, `backTapped`, `escapeKeyPressed` |\n| Clips | `backButtonTapped` |\n\nSee [DismissedReason](../Analytics.md#dismissedreason) for each value. [`dismissPlayer`](storyteller.md#dismissplayer) reports `instanceMethod`, and puts the reason you pass it in `customDismissedReason`.\n\n### `StorytellerTrackedFunctionalFeature`\n\n```typescript\nenum StorytellerTrackedFunctionalFeature {\n all = 'all',\n clipLikes = 'clipLikes',\n clipShares = 'clipShares',\n clipViewedStatus = 'clipViewedStatus',\n pageReadStatus = 'pageReadStatus',\n pollVotes = 'pollVotes',\n triviaQuizAnswers = 'triviaQuizAnswers',\n}\n```\n\nThe items of `eventTrackingOptions.disabledFunctionalFeatures`. `all` disables every item. See [Disabled functional features](../PrivacyAndTracking.md#disabled-functional-features).\n\n!!! note\n\n The npm package exports this enum at runtime. The CDN script does not, so `Storyteller.StorytellerTrackedFunctionalFeature` is `undefined` there. Pass the string values instead, such as `['pageReadStatus']`.\n\n### Theme enums\n\nThree enums set theme properties. See [Customize themes](../Themes.md) for each property:\n\n| Enum | Values | Theme properties |\n| --- | --- | --- |\n| `Alignment` | `start`, `center`, `end` | [`storyTiles.title.alignment`, `storyTiles.rectangularTile.chip.alignment`](../Themes.md#story-tiles) |\n| `ButtonAlignment` | `left`, `center`, `right` | [`player.actionButton.alignment`](../Themes.md#player) |\n| `TextCase` | `default`, `upper`, `lower` | [`buttons.textCase`](../Themes.md#buttons) |\n\n## Privacy options\n\nThe type of [`Storyteller.sharedInstance.eventTrackingOptions`](storyteller.md#eventtrackingoptions).\n\n### `StorytellerEventTrackingOptions`\n\n```typescript\ntype StorytellerEventTrackingOptions = {\n disabledFunctionalFeatures: StorytellerTrackedFunctionalFeature[];\n enableAdTracking: boolean;\n enableFullVideoAnalytics: boolean;\n enableFunctionalCookies: boolean;\n enablePersonalization: boolean;\n enableRemoteViewingStore: boolean;\n enableStorytellerTracking: boolean;\n enableUserActivityTracking: boolean;\n};\n```\n\n| Field | Default | Effect when changed from the default |\n| --- | --- | --- |\n| [`disabledFunctionalFeatures`](../PrivacyAndTracking.md#disabled-functional-features) | `[]` | Stops tracking the listed features |\n| [`enableAdTracking`](../PrivacyAndTracking.md#ad-tracking) | `true` | `false` stops ad events and removes Story and Clip details from ad requests |\n| [`enableFullVideoAnalytics`](../PrivacyAndTracking.md#full-video-analytics) | `true` | `false` sets Story, Page, and Clip IDs and titles to `null` in callback data |\n| [`enableFunctionalCookies`](../PrivacyAndTracking.md#functional-cookies-and-local-storage-items) | `true` | `false` stops non-essential local storage, and turns off personalization and Storyteller tracking |\n| [`enablePersonalization`](../PrivacyAndTracking.md#user-personalization) | `true` | `false` stops sending user IDs and user attributes for personalization |\n| [`enableRemoteViewingStore`](../PrivacyAndTracking.md#remote-viewing-store) | `true` | `false` keeps user IDs off backend services and keeps viewing activity on the device |\n| [`enableStorytellerTracking`](../PrivacyAndTracking.md#storyteller-tracking) | `true` | `false` stops storing analytics events on Storyteller servers |\n| [`enableUserActivityTracking`](../PrivacyAndTracking.md#user-activity-tracking) | `true` | `false` stops `onUserActivityOccurred` calls |\n\n## Content URLs\n\n### `parseDeepLink`\n\n```typescript\nparseDeepLink(url: string): DeepLink | null\n```\n\nReads a Storyteller content URL or player hash and returns its destination as a [`DeepLink`](#deeplink). It makes no requests and doesn't change the page. Call it as `Storyteller.parseDeepLink`, or import it by name.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `url` | `string` | Yes | None | A Storyteller content URL, or a player hash such as `#clips/collection-id` |\n\n```typescript\nconst deepLink = Storyteller.parseDeepLink(\n 'https://storyteller.com/go/clip?collectionId=collection-id&feed=following'\n);\n// { type: 'collection', collectionId: 'collection-id', initialFeed: 'following' }\n```\n\n- **Returns**: the destination, or `null` for an unsupported or malformed URL\n- **Since**: 11.1.0\n- **Guide**: [Supported URL formats](../OpenPlayer.md#supported-url-formats)\n\nTo open the destination, pass the same URL to [`openDeepLink`](storyteller.md#opendeeplink).\n\n### `DeepLink`\n\n```typescript\ntype DeepLink =\n | { type: 'story'; storyId: string; categoryId?: string }\n | { type: 'storyExternalId'; externalId: string }\n | {\n type: 'page';\n pageId: string;\n fallbackStoryId: string;\n answerId?: string;\n categoryId?: string;\n }\n | { type: 'category'; categoryId: string }\n | {\n type: 'clip';\n clipId: string;\n collectionId?: string;\n initialFeed?: ClipFeed;\n }\n | {\n type: 'clipExternalId';\n externalId: string;\n collectionId?: string;\n initialFeed?: ClipFeed;\n }\n | {\n type: 'clipCategory';\n categoryId: string;\n collectionId?: string;\n initialFeed?: ClipFeed;\n }\n | {\n type: 'collection';\n initialFeed?: ClipFeed;\n collectionId: string;\n clipId?: string;\n categoryId?: string;\n };\n```\n\nThe result of [`parseDeepLink`](#parsedeeplink). Check `type` to find the destination. The parser URL-decodes each ID once, so an ID that was encoded twice keeps one level of encoding.\n\n- **Pages**: the result keeps the link's `answerId`. [`openDeepLink`](storyteller.md#opendeeplink) opens the Page. When the Page can't load and the link has no `categoryId`, it opens the `fallbackStoryId` Story instead\n- **Categories in hashes**: Story and Page hashes name the category with the `categoryId` query parameter, and collection hashes with `category`. When a hash names both content and a category, `openDeepLink` keeps both. It rejects when a Story isn't in that category\n- **Clip categories**: `openDeepLink` rejects a `clipCategory` link without a `collectionId`\n- **Starting feed**: `initialFeed` is `'following'` when the URL has `feed=following`. The parameter name and value ignore case. When `openDeepLink` opens the link, a Clip or category in it takes priority over `initialFeed`\n\nSee [supported URL formats](../OpenPlayer.md#supported-url-formats).\n\n- **Since**: 11.1.0\n\n### `OpenDeepLinkOptions`\n\n```typescript\ntype OpenDeepLinkOptions = { context?: unknown };\n```\n\nThe options of [`openDeepLink`](storyteller.md#opendeeplink). `context` is your own placement data for the events of this opening. It replaces the context configured on the view that opens the content. When you leave it out, the events carry the view's configured context. Events from a player that the SDK creates, because no view on the page has the content, carry none. The SDK passes context only to your callbacks.\n\n- **Since**: 11.1.0\n\n## Event data\n\nThe data types of analytics events.\n\n### `UserActivityData`\n\nThe `data` argument of [`onUserActivityOccurred`](callbacks.md#onuseractivityoccurred). Every field is optional, and each event sets a subset. The event pages list the fields of each event.\n\n| Area | Fields and types |\n| --- | --- |\n| Context | `context` (`unknown`): the view's [`configuration.context`](../Analytics.md#context) |\n| Stories and Pages | `storyId`, `storyTitle`, `storyDisplayTitle`, `pageId`, `pageTitle` (`string`, or `null` when `enableFullVideoAnalytics` is `false`); `storyIndex`, `storyPageCount`, `pageIndex`, `durationViewed`, `pagesViewed`, `contentLength` (`number`); `storyReadStatus` (`string`); `storyPlaybackMode` (`'list'` or `'singleStory'`); `pageType` (`'image'`, `'video'`, `'poll'`, or `'triviaQuiz'`); `pageHasAction` (`boolean`); `pageActionText`, `pageActionUrl` (`string` or `null`) |\n| Navigation | `openedReason` ([`OpenedReason`](#openedreason)); `dismissedReason` ([`DismissedReason`](#dismissedreason)); `customDismissedReason` (`string`, the reason passed to [`dismissPlayer`](storyteller.md#dismissplayer)); `shareMethod` (`'share'`, `'shareMedia'`, `'shareLink'`, or `''`) |\n| Categories | `categories` (`string[]`); `categoryDetails` (`CategoryDetail[]`); `currentCategory` (`CurrentCategory`); `categoryId`, `categoryName`, `categoryType` (`string`) |\n| Ads | `adId`, `adStrategy` (`string`); `advertiserName` (`string` or `null`); `adType` (`'stories'` or `'clips'`); `adPlacement` (`'betweenClips'`, `'betweenStories'`, `'betweenStoriesAndPages'`, or `'betweenPages'`) |\n| Polls | `pollAnswerId` (`string`) |\n| Quizzes | `triviaQuizId`, `triviaQuizQuestionId`, `triviaQuizAnswerId`, `triviaQuizTitle` (`string`); `triviaQuizScore` (`number`) |\n| Clips | `clipId`, `clipTitle` (`string`, or `null` when `enableFullVideoAnalytics` is `false`); `collection` (`string`); `clipActionText`, `clipActionUrl` (`string` or `null`); `clipIndex`, `clipsViewed`, `loopsViewed` (`number`); `clipHasAction` (`boolean`); `clipFeedType` ([`ClipFeedType`](#clipfeedtype): `'default'`, `'forYou'`, or `'following'`), also set on Clip ad events |\n| Captions | `captionsEnabled` (`boolean`) |\n| Clip action taps | `actionClass` (`'primary'` or `'secondary'`); `actionIndex` (`number`, present for secondary actions only) |\n| CMS metadata | `metadata` (`Record<string, string>` or `null`): Story and Clip tile metadata, and active Clip metadata on player callbacks |\n| List tiles | `tileIndex` (`number`) |\n| Category follows | `categoryType`, `location` (`string`); `followableCategoryLimitDialogue`, `followableCategoryLimitActionText`, `followableCategoryLimitActionUrl` (`string` or `null`) |\n| SDK initialization | `initializationSucceeded`, `enableAdTracking`, `enableFullVideoAnalytics`, `enablePersonalization`, `enableRemoteViewingStore`, `enableStorytellerTracking`, `enableUserActivityTracking` (`boolean`); `appId`, `screenResolution` (`string` or `null`); `deviceBrand`, `deviceModel`, `operatingSystem`, `osVersion` (`string`); `deviceType` (`'Phone'`, `'Tablet'`, `'TV'`, or `'Desktop'`) |\n\nOn a Clip action tap, `clipActionText` and `clipActionUrl` describe the button the user tapped. `actionIndex` is the button's one-based position among the secondary actions set in the CMS. A Clip with one secondary action reports `1`.\n\n`shareMethod` is the Page's share setting from the Storyteller CMS. With `'share'` or `'shareMedia'`, the Story player downloads the Page's media file. With `'shareLink'`, it shares a link to the Page. Clip share events report `''`.\n\nThe SDK passes `actionClass`, `actionIndex`, and Clip CMS `metadata` only to your callbacks. It doesn't add them to the events it sends to Storyteller. See [Clip metadata](../Analytics.md#clip-metadata) for when `metadata` is absent, empty, or `null`.\n\nThe category types have these fields:\n\n```typescript\nclass CategoryDetail {\n name: string;\n id?: string;\n type: string;\n placement?: string;\n externalId?: string;\n}\n\nclass CurrentCategory {\n title: string;\n id?: string;\n placement?: string;\n}\n```\n\nClip playback events also use these optional fields: `quartile?: 25 | 50 | 75`, `startPosition?: number`, `endPosition?: number`, `scrubDirection?: 'forward' | 'backward'`, `completionType?: 'natural'`, and `isMuted?: boolean`. Seek positions and the heartbeat `durationViewed` are in milliseconds. See [Clip events](../analytics/ClipEvents.md) for when each event fires.\n\nThe SDK exports `UserActivityData` as a class. The callback receives a plain object with these fields.\n\n### `ClipFeedType`\n\n```typescript\ntype ClipFeedType = 'default' | 'forYou' | 'following';\n```\n\nThe type of `clipFeedType` on Clip and Clip ad events: `forYou` or `following` in a Clips player with the For You and Following tabs, and `default` in any other player. See [Clip feed type](../analytics/ClipEvents.md#clip-feed-type).\n\n- **Since**: 11.1.0\n\n### `ClipFeed`\n\n```typescript\ntype ClipFeed = Exclude<ClipFeedType, 'default'>; // 'forYou' | 'following'\n```\n\nA feed of a Clips player with the For You and Following tabs. It is the type of `initialFeed` in [Clips player configuration](views.md#clips-player-configuration-types), in the [`openCollection`](storyteller.md#opencollection) destination, and in [`DeepLink`](#deeplink).\n\n- **Since**: 11.1.0\n\n### `ActivityEventDetail`\n\n```typescript\nclass ActivityEventDetail {\n type: ActivityType;\n data: UserActivityData;\n constructor(type: ActivityType, data: UserActivityData);\n}\n```\n\nA pair of event type and event data. The SDK exports the class, but no SDK callback receives it in 11.1.0.\n\n## List tile data\n\n### `StorytellerTileData`\n\nThe `tile` argument of [`onTileTapped`](callbacks.md#ontiletapped). It is a `StorytellerStoryTileData` for a Story tile and a `StorytellerClipTileData` for a Clip tile. Check `type` to tell them apart.\n\n```typescript\ntype StorytellerTileData = StorytellerStoryTileData | StorytellerClipTileData;\n\ninterface StorytellerStoryTileData {\n type: 'story';\n storyId: string;\n storyTitle: string;\n tileIndex: number;\n categories: string[];\n categoryDetails: CategoryDetail[];\n metadata: Record<string, string> | null;\n}\n\ninterface StorytellerClipTileData {\n type: 'clip';\n clipId: string;\n clipTitle: string;\n collection: string;\n tileIndex: number;\n categories: string[];\n categoryDetails: CategoryDetail[];\n metadata: Record<string, string> | null;\n}\n```\n\n| Field | Description |\n| --- | --- |\n| `storyTitle`, `clipTitle` | The Story's internal title, or the Clip's title |\n| `collection` | The Clip collection the list shows, or the Clip's own collection |\n| `tileIndex` | The tile's one-based position in the list |\n| `categories` | The names of the content's categories |\n| `categoryDetails` | The content's categories, as in [`UserActivityData`](#useractivitydata) |\n| `metadata` | Key-value metadata set in the Storyteller CMS, or `null` when the API sends none |\n\n- **Since**: 11.1.0\n\n## Ad request data\n\nThe `adRequestInfo` argument of [`getAdConfig`](callbacks.md#getadconfig) and [`getBottomBannerAdConfig`](callbacks.md#getbottombanneradconfig), and the bottom banner configuration. See [AdRequestInfo](../Ads.md#adrequestinfo).\n\n### `StorytellerAdRequestInfo`\n\n```typescript\ntype StorytellerAdRequestInfo =\n | StorytellerStoriesAdRequestInfo\n | StorytellerClipsAdRequestInfo;\n```\n\nCheck for the `story` field to tell the variants apart:\n\n```typescript\nconst isStoryAd = (\n info: Storyteller.StorytellerAdRequestInfo\n): info is Storyteller.StorytellerStoriesAdRequestInfo => 'story' in info;\n```\n\n### `StorytellerStoriesAdRequestInfo`\n\n```typescript\ntype StorytellerStoriesAdRequestInfo = {\n placement: string;\n categories: string[];\n story: {\n id: '';\n categories: CategoryDetail[];\n };\n};\n```\n\n| Field | Description |\n| --- | --- |\n| `placement` | Placement code of the Story category that matches the first category ID of the view. `''` when none matches |\n| `categories` | Category IDs of the view that shows the Story |\n| `story.categories` | Categories of the Story, as [`CategoryDetail`](#useractivitydata) objects. Their `placement` is the placement title, not the code |\n| `story.id` | Always `''`. Deprecated |\n\nSee [Stories AdRequestInfo](../Ads.md#stories-adrequestinfo).\n\n### `StorytellerClipsAdRequestInfo`\n\n```typescript\ntype StorytellerClipsAdRequestInfo = {\n collection: string;\n clip: {\n id: '';\n categories: ClipCategory[];\n };\n nextClip?: {\n categories: ClipCategory[];\n };\n};\n```\n\n| Field | Description |\n| --- | --- |\n| `collection` | Collection ID |\n| `clip.categories` | Categories of the current Clip |\n| `nextClip.categories` | Categories of the next Clip. `nextClip` is absent when no next Clip exists |\n| `clip.id` | Always `''`. Deprecated |\n\nThe SDK also calls `getAdConfig` with an empty `clip.categories` and no `nextClip`, to check that you return a config with a `slot` before it places Clip ads. Make your callback handle an empty list.\n\n`ClipCategory` has these fields:\n\n```typescript\ninterface ClipCategory {\n id: string;\n name: string;\n externalId: string;\n placement: string | null;\n type: string;\n displayTitle: string;\n availableForNavigation: boolean;\n action?: IClipAction | null;\n categoryTypeCode?: string | null;\n description?: string | null;\n isFollowable?: boolean;\n showInClips?: boolean;\n thumbnailUrl?: string | null;\n}\n```\n\n| Field | Description |\n| --- | --- |\n| `id` | Storyteller's ID for the category |\n| `name` | Category name |\n| `externalId` | Category external ID, the ID you use in view configuration and ad targeting |\n| `placement` | Placement of the category, or `null` |\n| `type` | Category type, such as `team` |\n| `displayTitle` | The title shown to users |\n| `availableForNavigation` | `true` when the Clips player can list the category as a Category that the user opens |\n| `action` | What the follow control's image opens in place of the category's Clips: a web or in-app action, or nothing. `IClipAction` isn't exported by name |\n| `categoryTypeCode` | The category's type code, such as `publisher` |\n| `description` | Category description |\n| `isFollowable` | `true` when Storyteller marks the category as followable |\n| `showInClips` | `true` for the category that the Clip shows with its follow control |\n| `thumbnailUrl` | Category image URL |\n\nThe optional fields are present when Storyteller sends them.\n\nSee [Clips AdRequestInfo](../Ads.md#clips-adrequestinfo).\n\n### `StorytellerBottomBannerAdRequestInfo`\n\n```typescript\ntype StorytellerBottomBannerAdRequestInfo =\n StorytellerClipsAdRequestInfo & {\n placement: 'Bottom Banner';\n slotType: 'bottomBanner';\n };\n```\n\nThe `adRequestInfo` argument of [`getBottomBannerAdConfig`](callbacks.md#getbottombanneradconfig).\n\n| Field | Description |\n| --- | --- |\n| `placement` | Always `'Bottom Banner'` |\n| `slotType` | Always `'bottomBanner'` |\n| `collection` | Collection ID of the feed |\n| `clip.categories` | Categories of the Clip, as [`ClipCategory`](#storytellerclipsadrequestinfo) objects |\n| `clip.id` | Always `''` |\n\nThe SDK never sets `nextClip` in this request info.\n\n- **Since**: 11.1.0\n- **Guide**: [Clips bottom banners](../Ads.md#clips-bottom-banners)\n\n### `BottomBannerAdConfig`\n\n```typescript\ninterface BottomBannerAdConfig {\n type?: 'doubleclick';\n slot: string;\n size: [number, number] | [number, number][];\n customTargeting?: AdTargeting;\n}\n```\n\nThe return value of [`getBottomBannerAdConfig`](callbacks.md#getbottombanneradconfig): a Google Ad Manager display unit for the Clips bottom banner. [`AdTargeting`](callbacks.md#getadconfig) is the same type that `getAdConfig` uses.\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| `slot` | `string` | Yes | Ad unit path, in the form `/[NETWORK_CODE]/[UNIT_CODE]`. Use a banner unit, not the unit of your fullscreen ads |\n| `size` | `[number, number]` or `[number, number][]` | Yes | One `[width, height]` in CSS pixels, or every size the unit accepts, such as `[[320, 50], [300, 50]]`. Widths and heights are positive whole numbers, and heights are at most `80` |\n| `customTargeting` | `AdTargeting` | No | Key-value pairs for the banner request. They override the SDK keys `stCollection` and `stClipCategories`. The SDK drops them when `enableAdTracking` is `false` |\n| `type` | `'doubleclick'` | No | Ad server type. If you set it, it must be `'doubleclick'` |\n\nThe config needs a `slot` and a `size`. The SDK shows no banner when `slot` is empty, when any size isn't valid, or when you set `type` to a value other than `'doubleclick'`.\n\n- **Since**: 11.1.0\n- **Guide**: [Clips bottom banners](../Ads.md#clips-bottom-banners)\n\n## Followed categories\n\nThe types of [`getFollowableCategories`](storyteller.md#getfollowablecategories) and [`categoryFollowActionTaken`](callbacks.md#categoryfollowactiontaken). Version 11.1.0 added them. They exist only in TypeScript. See [Followed categories](../Users.md#followed-categories).\n\n### `StorytellerFollowableCategories`\n\n```typescript\ninterface StorytellerFollowableCategories {\n categories: StorytellerFollowableCategory[];\n}\n```\n\nThe result of [`getFollowableCategories`](storyteller.md#getfollowablecategories). `categories` lists the categories that your tenant lets users follow.\n\n### `StorytellerFollowableCategory`\n\n```typescript\ninterface StorytellerFollowableCategory {\n id: string;\n name?: string;\n displayTitle?: string;\n externalId?: string;\n type?: string;\n placement?: StorytellerPlacement;\n thumbnailUrl?: string;\n isFollowed: boolean;\n}\n```\n\nThe optional fields are present when Storyteller provides them.\n\n| Field | Description |\n| --- | --- |\n| `id` | Category ID |\n| `name` | Category name |\n| `displayTitle` | The title shown to users |\n| `externalId` | Category external ID |\n| `type` | The category's type code, such as `team`, `player`, or a custom type like `publisher` |\n| `placement` | The category's placement, as a [`StorytellerPlacement`](#storytellerplacement) |\n| `thumbnailUrl` | Category image URL |\n| `isFollowed` | `true` when the current user follows the category. The check includes the type, so two categories with the same external ID but different types stay independent |\n\nSee [List followable categories](../Users.md#list-followable-categories).\n\n### `StorytellerPlacement`\n\n```typescript\ninterface StorytellerPlacement {\n title: string;\n code: string;\n}\n```\n\nThe `placement` of a [`StorytellerFollowableCategory`](#storytellerfollowablecategory): the placement's title and code.\n\n### `StorytellerCategory`\n\n```typescript\ninterface StorytellerCategory {\n externalId: string;\n name: string;\n displayTitle: string;\n type: string;\n placement: string | null;\n description?: string;\n}\n```\n\nThe `category` argument of [`categoryFollowActionTaken`](callbacks.md#categoryfollowactiontaken): the category that the user followed or unfollowed in the Clips player.\n\n| Field | Description |\n| --- | --- |\n| `externalId` | Category external ID. Save it to your own list of followed categories |\n| `name` | Category name |\n| `displayTitle` | The title shown to users |\n| `type` | Category type, such as `team` |\n| `placement` | The category's placement, or `null` |\n| `description` | Category description, when the category has one |\n\nSee [Follow categories in the Clips player](../Users.md#follow-categories-in-the-clips-player).\n\n## Theme classes\n\nThe classes and types that build a theme. [Customize themes](../Themes.md) lists every theme property and default.\n\n### `UiTheme`\n\n```typescript\nclass UiTheme implements IUiTheme {\n light: StorytellerTheme;\n dark: StorytellerTheme;\n constructor(baseTheme?: Subset<IUiTheme> | null);\n}\n```\n\nHolds a `light` and a `dark` [`Theme`](#theme). The constructor builds both from `baseTheme`, and unset properties keep their defaults. The view's [`UiStyle`](#uistyle) decides which theme applies. See [Customize themes](../Themes.md#configuring-a-uitheme).\n\n```typescript\nconst theme = new Storyteller.UiTheme({\n light: { colors: { primary: '#1C62EB' } },\n dark: { colors: { primary: '#6699FF' } },\n});\n```\n\n### `Theme`\n\n```typescript\nclass StorytellerTheme implements IStorytellerTheme {\n colors: StorytellerColorsTheme;\n font: string;\n primitives: StorytellerPrimitivesTheme;\n lists: StorytellerListsTheme;\n storyTiles: StorytellerTilesTheme;\n player: StorytellerPlayerTheme;\n clipPlayer: StorytellerClipPlayerTheme;\n buttons: StorytellerButtonsTheme;\n instructions: StorytellerInstructionsTheme;\n engagementUnits: StorytellerEngagementUnitsTheme;\n isDark: boolean;\n constructor(theme?: Subset<IStorytellerTheme>);\n toPlainObject(): this;\n}\n```\n\nExported as `Theme`. One color scheme of a theme. The constructor copies the properties of `theme` over the defaults. The SDK sets `isDark` when it builds the dark theme. `toPlainObject()` returns the same instance, not a copy.\n\n| Property | Theme section |\n| --- | --- |\n| `colors` | [Colors](../Themes.md#colors) |\n| `font` | [Font](../Themes.md#font) |\n| `primitives` | [Primitives](../Themes.md#primitives) |\n| `lists` | [Lists](../Themes.md#lists) |\n| `storyTiles` | [Story Tiles](../Themes.md#story-tiles) |\n| `player` | [Player](../Themes.md#player) |\n| `clipPlayer` | [Clips player](../Themes.md#clip-player) |\n| `buttons` | [Buttons](../Themes.md#buttons) |\n| `instructions` | [Instructions](../Themes.md#instructions) |\n| `engagementUnits` | [Polls and Quizzes theme](../Themes.md#engagement-units) |\n\n### `Subset`\n\n```typescript\ntype Subset<K> = {\n [attr in keyof K]?: K[attr] extends object\n ? Subset<K[attr]>\n : K[attr] extends object | null\n ? Subset<K[attr]> | null\n : K[attr] extends object | null | undefined\n ? Subset<K[attr]> | null | undefined\n : K[attr];\n};\n```\n\nA recursive `Partial`. Theme inputs use it, so you set only the properties that you change, at any depth.\n\n```typescript\nconst rowTheme: Storyteller.Subset<Storyteller.UiTheme> = {\n light: { lists: { row: { startInset: 0 } } },\n};\n```\n\n## Server rendering\n\nThese exports build Story markup for server-side rendering. They do not use `window` or `document`.\n\n### `ServerRenderer`\n\n```typescript\nServerRenderer.getStories(categories?: string[]): Promise<ServerRenderedStory[]>\nServerRenderer.render(stories: ServerRenderedStory[]): React.JSX.Element\n```\n\nA singleton instance. `getStories` loads the Stories of the given categories with the API key from `initialize`. It keeps only Stories that have a Web Story URL: a standalone page for the Story in Google's Web Stories format. `render` returns a hidden `<amp-story-player>` element, the AMP element that embeds Web Stories, with a link, poster image, and title for each Story. No task guide covers these methods.\n\n| Parameter | Type | Required | Default | Description |\n| --- | --- | --- | --- | --- |\n| `categories` | `string[]` | No | `[]` | Story category IDs |\n| `stories` | `ServerRenderedStory[]` | Yes | None | Stories from `getStories` |\n\n### `ServerRenderedStory`\n\n```typescript\ntype ServerRenderedStory = {\n id: string;\n href: string;\n title: string;\n thumbnailUrl: string;\n};\n```\n\n`href` is the Story's Web Story URL, the standalone page for the Story in Google's Web Stories format.\n\n## Other exports\n\nThe SDK also exports these names. No guide covers them, and integrations do not need them:\n\n| Export | Kind | Notes |\n| --- | --- | --- |\n| `Story` | Class | Story data model from the Stories API. No public SDK method or callback returns it in 11.1.0 |\n| `QuizRenderer` | Instance | Renders Quiz questions and results inside a Story page document. The SDK's Story page script uses its own copy |\n| `QuizApiService` | Instance | Loads Quiz data for Story pages. The SDK's Story page script uses its own copy |\n", "copy_markdown_include_header": false, "base_path": "", "ai_dir": "ai", "missing_payload_behavior": "empty"}