Initialize and configure video analytics

Last update: 2023-10-02

You can configure your player to track and analyze video use.

Before activating video tracking (video heartbeats), ensure that you have the following:

  • TVSDK for iOS
  • Configuration / Initialization Information - Contact your Adobe representative for your specific video-tracking account information:

Important: This JSON config file name must remain ADBMobileConfig.json . The name and the path of this configuration file cannot be changed. The path to this file must be <source root>/AdobeMobile .

AppMeasurement tracking server endpoint The URL of the Adobe Analytics (formerly SiteCatalyst) back-end collection endpoint.
Video analytics tracking server endpoint The URL of the video analytics back-end collection endpoint. This is where all video heartbeat tracking calls are sent.

Tip: The URL of the visitor tracking server is the same as the URL of the analytics tracking server. For information about implementing the Visitor ID Service, see Implement ID Service .

Account name Also known as the Report Suite ID (RSID).
Marketing Cloud organization ID A string value required for instantiating the Visitor component.
Publisher This is the Publisher ID, which is provided to customers by their Adobe representative.

Tip: This ID is not just a string with the brand/television name.

To configure video tracking in your player:

  1. Confirm that load-time options in the ADBMobileConfig.json resource file are correct.

        "version" : "1.1",
        "analytics" : {
            "rsids" : "adobedevelopment",
            "server" : "",
            "charset" : "UTF-8",
            "ssl" : false,
            "offlineEnabled" : false,
            "lifecycleTimeout" : 5,
            "batchLimit" : 50,
            "privacyDefault" : "optedin",
            "poi" : []
        "marketingCloud": {
            "org": "ADOBE PROVIDED VALUE"
        "target" : {
            "clientCode" : "",
            "timeout" : 5
        "audienceManager" : {
            "server" : ""

    This JSON-formatted configuration file is bundled as a resource with TVSDK. Your player reads these values only at load time, and the values remain constant while your application runs.

    To configure load-time options:

    1. Confirm that the ADBMobileConfig.json file contains the appropriate values that are provided by Adobe.

    2. Confirm that this file is located in the AdobeMobile folder.

      This folder must be located in the root of your application source tree.

    3. Compile and build your application.

    4. Deploy and run the bundled application.

      For more information about these AppMeasurement settings, see Measuring Video in Adobe Analytics.

  2. Initialize and configure video heartbeat tracking metadata.


    You can stop the video analytics module midstream and reinitialize it again as necessary. Before the module is reinitialized, ensure that the video analytics metadata is also updated to the correct content metadata. To recreate the metadata, repeat sub-steps 1 and 2.

    1. Create an instance of the Video Analytics metadata.

      This instance contains all of the configuration information that is needed to enable video heartbeat tracking. For example:

      - (PTVideoAnalyticsTrackingMetadata *)getVideoAnalyticsTrackingMetadata
          PTVideoAnalyticsTrackingMetadata *vaTrackingMetadata =
            [[[PTVideoAnalyticsTrackingMetadata alloc]
                 publisher:@"sample-publisher"] autorelease];
          // Set these to NO for production deployment.
          vaTrackingMetadata.debugLogging = YES;
          vaTrackingMetadata.quietMode = NO;
 = @"test-channel";
          vaTrackingMetadata.videoName = @"myvideo";
          vaTrackingMetadata.videoId = @"myvideoid";
          vaTrackingMetadata.playerName = @"PSDK Player";
          vaTrackingMetadata.enableChapterTracking = YES;
          vaTrackingMetadata.useSSL = NO;
          // use this API to override the default asset length -1 for live streams
          vaTrackingMetadata.assetDuration = SAMPLE_ASSET_DURATION;
    2. Add the Video Analytics metadata to the global metadata instance.

      When you are ready, set the global metadata instance on the media resource or the media player item:

      - (PTMetadata *)createMetadata
          PTMetadata *metadata = [[[PTMetadata alloc] init] autorelease];
          [metadata setMetadata:[self getVideoAnalyticsTrackingMetadata]
          return metadata;
      PTMetadata *metadata = [self createMetadata];
      PTMediaPlayerItem *item =
        [[[PTMediaPlayerItem alloc] initWithUrl:[[[NSURL alloc]
          initWithString:@"media-url"] autorelease]
          mediaId:@"media-id" metadata:metadata] autorelease];
    3. Initialize the Video Analytics tracker.

      After creating a media player instance, you must create a Video Analytics tracker instance and provide a reference to the media player instance.


      Always create a new tracker instance for each content playback session and remove the previous reference after you detach the media player instance.

      self.videoAnalyticsTracker =
        [[[PTVideoAnalyticsTracker alloc] initWithMediaPlayer:self.player] autorelease];
    4. Destroy the Video Analytics tracker.

      Before you begin a new content playback session, destroy the previous instance of the video tracker. After you receive the content complete event (or notification), wait a few minutes before you destroy the video tracker instance. Destroying the instance immediately might interfere with the Video Analytics tracker’s ability to send a video complete ping.

      self.videoAnalyticsTracker = nil;
    5. Manually mark the Live/Linear stream as complete.

      If you have various episodes on one live stream, you can manually mark an episode as complete by using the complete API. This ends the video tracking session for the current video episode, and you can start a new tracking session for the next episode.


      This API is optional and is not needed for VOD video tracking.

      if (self.videoAnalyticsTracker)
         [self.videoAnalyticsTracker trackVideoComplete];

On this page