---
updatedAt: 2026-06-12T07:17:11.000Z
agentTools:
  siteIndex: https://developer.bitmovin.com/llms.txt
  projectIndex: https://developer.bitmovin.com/playback/llms.txt
---

# AnalyticsApi

com.bitmovin.player.api.analytics

# AnalyticsApi

interface AnalyticsApi

Provides the means to control the analytics collected by a [Player](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-player).

Use the Player.analytics extension to access a [Player](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-player)'s AnalyticsApi.

## Types

| Name      | Summary                                                                                                                                     |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Companion | object Companion<br>Use the Player.analytics extension to access a [Player](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-player)'s AnalyticsApi. |

## Properties

| Name         | Summary                                                                                                                                                                     |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| impressionId | abstract val impressionId: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)?<br>The impression id of the current Source if any is playing. |
| ssai         | abstract val ssai: SsaiApi<br>Use the SsaiApi to track data related to server side ad insertion.                                                                            |
| userId       | abstract val userId: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)<br>The userId that is sent with each analytics sample.               |

## Functions

| Name                | Summary                                                                                                                                                                                                                                             |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| programChange       | abstract fun programChange(sourceMetadata: SourceMetadata)<br>Signals a program change to the analytics collector without loading a new source on the player. This starts a new impression with the provided sourceMetadata.                        |
| sendCustomDataEvent | abstract fun sendCustomDataEvent(customData: CustomData)<br>Send an analytics sample with customData without changing the player's current [SourceAnalyticsApi.customData](https://developer.bitmovin.com/playback/docs/android-api-com-bitmovin-player-api-analytics-source-analytics-api). |