Configure Video Analytics real-time video tracking (video heartbeat) in a PSDK-based player.
The following items are required to activate real-time video tracking (video heartbeat) in a PSDK-based player for iOS:
| ADBMobileConfig.json |
Note: IMPORTANT: The name and the path of this
configuration file must not change. This JSON config file
must be named
ADBMobileConfig.json. 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 end-point. |
| Video Analytics tracking server endpoint | The URL of the Video Analytics back-end collection end-point. This is where all video heartbeat tracking calls are sent. |
| Account name | Also known as the Report Suite ID (RSID). |
| Job ID | The processing job identifier. This indicates to the back-end endpoint which kind of processing to apply for the video-tracking calls. |
| Publisher | The name of the content publisher (the brand or television channel using the video tracking capabilities). |
To configure real-time video tracking in your PSDK-based player:
{
"version" : "1.1",
"analytics" : {
"rsids" : "YOUR_ADOBE_ANALYTICS_RSID",
"server" : "URL_OF_THE_ADOBE_ANALYTICS_TRACKING_SERVER (provided by Adobe)",
"charset" : "UTF-8",
"ssl" : false,
"offlineEnabled" : false,
"lifecycleTimeout" : 5,
"batchLimit" : 50,
"privacyDefault" : "optedin",
"poi" : []
},
"target" : {
"clientCode" : "",
"timeout" : 5
},
"audienceManager" : {
"server" : ""
}
}
Your load-time options are specified in this JSON-formatted configuration file. This file is bundled as a resource with the PSDK. The Primetime Player reads these values only at load time; they remain constant while your application runs. To configure load-time options:
For more information on these AppMeasurement settings, see Measuring Video in Adobe Analytics.
Video Analytics configuration follows the usual pattern of setting a specific metadata object on the PTMediaPlayerItem instance that is about to be sent to the player for playback. The VideoAnalytics metadata object has mandatory and optional configuration parameters.
Sample Video Analytics configuration:
// Instantiate VideoAnalytics tracking metadata.
PTVideoAnalyticsTrackingMetadata *trackingMetadata =
[[[PTVideoAnalyticsTrackingMetadata alloc]
initWithTrackingServer:@"THE_URL_OF_THE_VIDEO_HEARTBEATS_SERVER (provided by Adobe)"
jobId:@"YOUR_JOB_ID"
publisher:@"YOUR_PUBLISHER_NAME"] autorelease];
trackingMetadata.playerName = @"YOUR_PLAYER_APP_NAME";
// Set this to true to activate the debug tracing.
trackingMetadata.debugLogging = YES;
// Set this to true to log the URLs of the output HTTP calls.
trackingMetadata.debugTracking = YES;
// This defaults to YES, which activates the "quiet" mode.
// Make sure "quiet mode" is NOT on, to actually send network calls.
trackingMetadata.trackLocal = NO;
// Explicitly activate the video heartbeat functionality.
trackingMetadata.enableHeartbeat = YES;
// Set the metadata on the ROOT metadata.
PTMetadata *root = [[[PTMetadata alloc] init] autorelease];
[root setMetadata: trackingMetadata forKey: PTVideoAnalyticsTrackingMetadataKey];
// Attach the ROOT metadata on the media item.
PTMediaPlayerItem *mediaItem = [[[PTMediaPlayerItem alloc]
initWithUrl:nsurl mediaId:@"video-id" metadata:root] autorelease];
After you provide the metadata to the PTMediaPlayerItem, call the initWithMediaPlayer method right after the player has been created.
// Create a new Video Analytics Tracker instance using the current media player // instance to start tracking video analytics data self.videoAnalyticsTracker = [[[PTVideoAnalyticsTracker alloc] initWithMediaPlayer:self.player] autorelease];