StorytellerAnalyticsContext

A typealias for a HashMap containing string key-value pairs used to provide optional integrator-defined context for Storyteller UI instances.

This context is included with analytics callbacks to improve attribution and debugging. It allows integrators to identify which specific placement (row, grid, card, home section, etc.) generated an analytics event.

Common Use Cases:

  • placementId: Unique identifier for the UI placement (e.g., "home_top_tabs")

  • location: Hierarchical location in app (e.g., "Home/TopTabs/Clips")

  • sortOrder: Display order in a list (e.g., "1", "2", "3")

Example Usage:

val context: StorytellerContext = hashMapOf(
"placementId" to "home_top_tabs",
"location" to "Home/TopTabs/Stories",
"sortOrder" to "1"
)

val config = StorytellerStoriesView.ListConfiguration(
categories = listOf("featured"),
context = context
)

See also