Milestone Reporting Configuration

To set-up video reporting for a Milestone implementation, go to Admin > Report Suite Manager. Select the report suite, then choose Video Management > Video Reporting:

On the first screen, only Video Core will work with Milestone data. Select Video Core and click Save.

On the next screen, select Use Custom Variables.

On the final screen, select the two eVars and three events to be used with your video measurement:

Video variable reference

The following table contains additional details on the commerce variables and custom events for video:

Video MetricVariable TypeDescription
ContenteVar
Default expiration: Visit
(Required) Collects the name of the video, as specified in the implementation.
Content TypeeVar
Default expiration: Page view
Collects data about the type of content viewed by a visitor. Hits sent by video measurement are assigned a content type of video.
This variable does not need to be reserved exclusively for video tracking. Having other content report content types using this same variable lets you analyze the distribution of visitors across the different types of content. For example, you could tag other content types using values such as article or product page using this variable.
From a video measurement perspective, Content Type lets you identify video visitors and thereby calculate video conversion rates.
Content Time SpentEvent
Type: Counter
Counts the time, in seconds, spent watching a video since the last data collection process (image request).
Video InitiatesEvent
Type: Counter
Indicates that a visitor has viewed some portion of a video. However, it does not provide any information about how much, or what part, of a video the visitor viewed.
Video CompletesEvent
Type: Counter
Indicates that a user has viewed a complete video. By default, the complete event is measured 1 second before the end of the video.
During implementation, you can specify how many seconds from the end of the video you would like to consider a view complete. For live video and other streams that don’t have a defined end, you can specify a custom point to measure completes. For example, after a specific time viewed.

Media Module variables

The following variables let you configure video measurement. You must define values for the variables in the Required Variables table. Additionally, to track events in your video player, you must enable autoTrack (for supported players) or implement custom player event tracking using the open, play, stop, and close methods.

VariableDescription
Media.trackUsingContextDataSyntax:

s.Media.trackUsingContextData = true;
This option enables integrated video tracking. When set to true, the media module generates context data for media tracking, instead of the legacy pev3.
Use Media.contextDataMapping to map the context data to the selected eVars and Events.
Default value: false
Media.contextDataMappingSyntax:

s.Media.contextDataMapping = {
     "a.media.name":"eVar2, prop2",
     "a.media.segment":"eVar3",
     "a.contentType":"eVar1",
     "a.media.timePlayed":"event3",
     "a.media.view":"event1",
     "a.media.segmentView":"event2",
     "a.media.complete":"event7",
     "a.media.milestones":{
         25:"event4",
         50:"event5",
         75:"event6"
     }
};

An object that defines variable mapping to eVars and Events that you want to use for video measurement. The object must map the following fields:

a.media.name: (Required) Populates variables with the video name. Provide the eVar that you selected to store the video name, and the Custom Insight Video variable ( s.prop ) you want to use for video pathing. Provide the values in a comma-separated list.

a.media.segment: (Optional) The eVar that you want to store the media segment name. a.contentType: (Optional) The eVar that you want to store the video value, which contains visit and visitor tracking enabled to generate video visit and visitor reporting. The variable you select is likely already used to store data such as article slide show or product page

a.media.view: (Required) The Event that you want to count media views.

a.media.segmentView: (Optional) The Event that you want to count segment views.

a.media.complete: (Optional) The Event that you want to count complete views.

a.media.timePlayed: (Optional, highly recommended) The numeric Event that you want to store the number of video seconds played.

a.media.milestones: (Optional) An object that maps s.Media.trackMilestones milestones to counter Events. Media.segmentByMilestones should be set to true if you define milestones.

Ad tracking To track ads, the following context data variables are available:
a.media.ad.name: (Required) Populates variables with the ad name. Provide the eVar that you selected to store the ad name, and the Custom Insight Video variable ( s.prop ) you want to use for pathing. Provide the values in a comma-separated list.

a.media.ad.pod: The position in the primary content the ad was played.

a.media.ad.podPosition: The position within the pod where the ad is played.

a.media.ad.CPM: The CPM or encrypted CPM (prefixed with a “~”) that applies to this playback.

a.media.ad.view: Works the same as a.media.view

a.media.ad.clicked: Count the number of clicks for the ad (Media.click calls)

a.media.ad.timePlayed: Works the same as a.media.timePlayed

a.media.ad.complete: Works the same as a.media.complete a.media.ad.segment: Works the same as a.media.segment

a.media.ad.segmentView: Works the same as a.media.segmentView

a.media.ad.milestones: Works the same as a.media.milestones

a.media.ad.offsetMilestones: Works the same as a.media.offsetMilestones
Media.trackVarsSyntax:

s.Media.trackVars =
   "events, prop2, eVar1, eVar2, eVar3";

A comma-separated list of all variables that are set in your video tracking code.
Media.trackEventsSyntax:

s.Media.trackEvents =
   "event1, event2, event3, event4, event5, event6, event7"

A comma-separated list of all events that are set in your video tracking code.

Optional variables

VariableDescription
Media.autoTrack

Syntax:

s.Media.autoTrack = true

Enables automatic tracking for supported players. Supported players are as follows:

  • Open Source Media Framework (OSMF)
  • FLVPlayback (Video players created by the import video wizard in Flash Professional)
  • Silverlight
  • MediaDisplay
  • MediaPlayback
  • Brightcove API versions 2 & 3 ( see Brightcove
  • Windows Media Player, Quicktime, or Real Player using JavaScript

If you are not using one of the above players you can use Media.open Media.play Media.stop Media.close to track player events.

Media.autoTrackNetStreamsSyntax:

s.Media.autoTrackNetStreams = true

Flash 10.3 introduced new functionality to the NetStream component that enables enhanced video tracking. If you are using a custom Flash NetStream player you can enable this variable to enable functionality similar to autoTrack. This method requires that videos are viewed in Flash 10.3 or later.
Media.completeByCloseOffsetSyntax:



s.Media.completeByCloseOffset = true

This setting lets you count a complete video view a few seconds before the actual end of the video.

The event is sent based on the number of seconds specified in completeCloseOffsetThreshold. This lets you measure completes in video players that never report an offset equal to the length of the video.

By default, this value is set to true and the threshold is set to 1 second. With these defaults the complete event is sent 1 second before the end of the video.
Media.completeCloseOffsetThresholdSyntax:

s.Media.completeCloseOffsetThreshold = 1

This threshold lets you count a complete video view a few seconds before the actual end of the video. Media.completeByCloseOffset must be set to true to use this threshold.

The integer value you supply determines how far off in seconds the offset can be from the length of the video at close and still count as a complete. This lets you measure completes in video players that never report an offset equal to the length of the video.

The default threshold is 1 second.
Media.playerNameSyntax:

s.Media.playerName = "Custom Player Name"

Specifies a custom video player name.
Media.trackSecondsSyntax:

s.Media.trackSeconds = 15

Defines the interval, in seconds, for sending video tracking data to Adobe data collection servers while the video is playing. The value must be set in increments of 5 seconds.

Enabling Media.trackSeconds triggers only the events that are defined in Media.contextDataMapping. To send additional variables outside of those specified for video measurement, you must use Media.Monitor.
Media.trackMilestonesTracks milestones as percentage of the video length.

Syntax:

s.Media.trackMilestones = "25, 50, 75";

Defines the interval, as a percentage of the video length, for sending video tracking data to Adobe data collection servers. Specify the milestones as a comma-separated list of whole numbers. For example: 10 = 10%, 23 = 23%.

Because these milestones are fixed points in the video, if a visitor views past the 10% milestone, then rewinds and passes the 10% milestone again, the media module sends the tracking data multiple times. Similarly, if a visitor fast forwards past a milestone, the media module does not send the tracking data for that milestone.

Enabling Media.trackMilestones triggers only the events that are defined in Media.contextDataMapping. To send additional variables outside of those specified for video measurement, you must use Media.Monitor.
Media.trackOffsetMilestonesTracks milestones as seconds elapsed from the beginning of the video.

Syntax:

s.Media.trackOffsetMilestones = "20, 40, 60";

Defines the interval, as seconds elapsed from the beginning of the video, for sending video tracking data to Adobe data collection servers. Specify the milestones as a comma-separated list of whole numbers. For example: 20 = 20 seconds, 40 = 40 seconds).

Because these milestones are fixed points in the video, if a visitor views past the 20 seconds milestone, then rewinds and passes the 20 seconds milestone again, the media module sends the tracking data multiple times. Similarly, if a visitor fast forwards past a milestone, the media module does not send the tracking data for that milestone.

Enabling Media.trackOffsetMilestones triggers only the events that are defined in Media.contextDataMapping. To send additional variables outside of those specified for video measurement, you must use Media.Monitor.
Media.segmentByMilestonesSyntax:

s.Media.segmentByMilestones = true;

Automatically generates the segment name, segment number, and segment length data, based on the length of the media and the milestones specified in Media.trackMilestones

Segmenting by milestones is the only way to define segments when using autoTrack.

Default value: false
Media.segmentByOffsetMilestonesSyntax:

s.Media.segmentByOffsetMilestones = true;

Automatically generates the segment name, segment number, and segment length data, based on the length of the media and the milestones specified in Media.trackOffsetMilestones

Segmenting by milestones is the only way to define segments when using autoTrack.

Default value: false

Ad Tracking variables

These variables are used to send ad information in conjunction with the openAd method. See VAST Video Ad Tracking.

VariableDescription
Media.adTrackSecondsSyntax:

s.Media.adTrackSeconds = 15;

Defines the interval, in seconds, for sending video ad tracking data to Adobe data collection servers while the video is playing. The value must be set in increments of 5 seconds.

Enabling Media.adTrackSeconds triggers only the events that are defined in Media.contextDataMapping. To send additional variables outside of those specified for video measurement, you must use Media.monitor.
Media.adTrackMilestonesTracks ad milestones as percentage of the ad length.

Syntax:

s.Media.adTrackMilestones = "25, 50, 75";

Defines the interval, as a percentage of the ad length, for sending ad tracking data to Adobe data collection servers. Specify the milestones as a comma-separated list of whole numbers. For example: 10 = 10%, 23 = 23%).

Because these milestones are fixed points in the ad, if a visitor views past the 10% milestone, then rewinds and passes the 10% milestone again, the media module sends the tracking data multiple times. Similarly, if a visitor fast forwards past a milestone, the media module does not send the tracking data for that milestone.

Enabling Media.adTrackMilestones triggers only the events that are defined in Media.contextDataMapping. To send additional variables outside of those specified for video measurement, you must use Media.monitor.
Media.adTrackOffsetMilestonesTracks ad milestones as seconds elapsed from the beginning of the ad.

Syntax:

s.Media.adTrackOffsetMilestones = "20, 40, 60";

Defines the interval, as seconds elapsed from the beginning of the ad, for sending ad tracking data to Adobe data collection servers. Specify the milestones as a comma-separated list of whole numbers. For example: 20 = 20 seconds, 40 = 40 seconds).

Because these milestones are fixed points in the ad, if a visitor views past the 20 seconds milestone, then rewinds and passes the 20 seconds milestone again, the media module sends the tracking data multiple times. Similarly, if a visitor fast forwards past a milestone, the media module does not send the tracking data for that milestone.

Enabling Media.adTrackOffsetMilestones triggers only the events that are defined in Media.contextDataMapping. To send additional variables outside of those specified for video measurement, you must use Media.monitor.
Media.adSegmentByMilestonesSyntax:

s.Media.adSegmentByMilestones = true;

Automatically generates the segment name, segment number, and segment length data, based on the length of the media and the milestones specified in Media.adTrackMilestones

Segmenting by milestones is the only way to define segments when using autoTrack.

Default value: false
Media.adSegmentByOffsetMilestonesSyntax:

s.Media.adSegmentByOffsetMilestones = true;

Automatically generates the segment name, segment number, and segment length data, based on the length of the media and the milestones specified in Media.adTrackOffsetMilestones

Segmenting by milestones is the only way to define segments when using autoTrack.

Default value: false

Media Module methods

The media module methods are used to manually tracking player events and to track additional metrics that are not part of the standard video reports.

If you are using Media.autoTrack and are not tracking additional metrics, you do not need to call any of these methods directly. All arguments are required unless specified as optional.

MethodDescription
Media.open

Syntax:

s.Media.open(mediaName, mediaLength, mediaPlayerName)

Prepares the media module to collect video tracking data. This method takes the following parameters:

  • mediaName: (Required) The name of the video as you want it to appear in video reports.
  • mediaLength: (Required) The length of the video in seconds.
  • mediaPlayerName: (Required) The name of the media player used to view the video, as you want it to appear in video reports.
Media.openAd

Syntax:

s.Media.openAd(name, length, playerName, parentName,
   parentPod, parentPodPosition, CPM)

Prepares the media module to collect ad tracking data. This method takes the following parameters:

  • name: (Required) The name or ID of the ad.
  • length: (Required) The length of the ad.
  • playerName: (Required) The name of the media player used to view the ad.
  • parentName: The name or ID of the primary content where the ad is embedded.
  • parentPod: The position in the primary content the ad was played.
  • parentPodPosition: The position within the pod where the ad is played.
  • CPM: The CPM or encrypted CPM (prefixed with a “~”) that applies to this playback.
Media.click

Syntax:

s.Media.click(name, offset)

Track when an ad is clicked in a video. This method takes the following parameters:

  • name: The name of the ad. This must match the name used in Media.openAd.
  • offset: The offset into the ad when the click occurred.
Media.closeSyntax:

s.Media.close(mediaName)

Ends video data collection and sends information to Adobe data collection servers. Call this method at the end of the video. This method takes the following parameter:

mediaName: The name of the video. This must match the name used in Media.open.
Media.complete

Syntax:

s.Media.complete(name, offset)

This method manually tracks a complete event. This method is used when you need to trigger events using special logic that can’t be handled using Media.completeByCloseOffset.

For example, if you are measuring a live stream that has no defined end, you might trigger a complete after a user views a live stream for X seconds. You might measure a complete using a percentage calculation based on the length and type of content. This method takes the following parameters:

  • mediaName: The name of the video. This must match the name used in Media.open.
  • mediaOffset: The number of seconds into the video when the complete event should be sent. Specify the offset based on the video starting at second zero.

    If your media player tracks using milliseconds, make sure the value is converted to seconds before you call Media.complete.

If you plan to call complete manually, set

s.Media.completeByCloseOffset = false.

Media.playSyntax:

s.Media.play(name, offset, segmentNum, segment, segmentLength)

Call this method anytime a video starts playing. When using manual video measurement, you can provide the current segment data when sending video measurement data.

If your player changes from one segment to another, for whatever reason, you should call Media.stop Media.play.

This method takes the following parameters:

mediaName: The name of the video. This must match the name used in Media.open.

mediaOffset: The number of seconds into the video that play begins. Specify the offset based on the video starting at second zero. If your media player tracks using milliseconds, make sure the value is converted to seconds before you call Media.play.

segmentNum: (Optional) The current segment number, which marketing reports use to order the display of segments in reports. The segmentNum parameter must be greater than zero.

segment: (Optional) The current segment name.

segmentLength: (Optional)

The current segment length, in seconds.

For example:

s.Media.play("My Video", 1800, 2,"Second Quarter", 1800)

s.Media.play("My Video", 0, 1,"Preroll", 30)
Media.stop

Syntax:

s.Media.stop(mediaName, mediaOffset)

Tracks a stop event (stop, pause, etc.) for the specified video. This method takes the following parameters:

  • mediaName: The name of the video. This must match the name used in Media.open.
  • mediaOffset: The number of seconds into the video that the stop or pause event occurs. Specify the offset based on the video starting at second zero.
Media.monitor

Syntax:

s.Media.monitor(s, media)

Silverlight Syntax:

s.Media.monitor =
   new AppMeasurement_Media_Monitor(myMediaMonitor);

The Silverlight app media monitor implements the Objective-C delegate design pattern. The myMediaMonitor class method takes the s and media parameters.

Use this method to send additional video metrics. You can setup additional variables (Props, eVars, Events) and send them using Media.track based on the current state of the video as it is playing.

See Measuring Additional Metrics using Media.monitor.

This method takes the following parameters:

s: The AppMeasurement instance (or JavaScript s object).

media: An object with members providing the state of the video. These members include:

  • media.name: The name of the video. This must match the name used in Media.open;
  • media.length: The length of the video in seconds given in the call to Media.open;
  • media.playerName: The name of the media player given in the call to Media.open;
  • media.openTime: An NSDate object containing data about when Media.open was called;
  • media.offset: The current offset, in seconds, (actual point in the video) into the video. The offset starts at zero (the first second of the video is second 0);
  • media.percent: The current percentage of the video that has played, based on the video length and the current offset.;
  • media.timePlayed: The total number of seconds played so far;
  • media.eventFirstTime: Indicates if this was the first time this media event was called for this video;
  • media.mediaEvent: A string containing the event name that caused the monitor call.

media.mediaEvent events:

  • OPEN: When playback is first observed through Media.autoTrack or a call to Media.play;
  • CLOSE: When playback ends at the completion of the video through Media.autoTrack or at a call to Media.close;
  • PLAY: When playback resumes after being paused or scrubbing through Media.autoTrack or a second call to Media.play;
  • STOP: When playback stops due to a pause of the beginning of scrubbing through Media.autoTrack or a call to Media.stop;
  • MONITOR: When our automatic monitoring checks the state of the video while it’s playing (every second);
  • SECONDS: At the second interval defined by the Media.trackSeconds variable;
  • MILESTONE: At the milestones defined by the Media.trackMilestones variable;
Media.track

Syntax:

s.Media.track(mediaName)

Immediately sends the current video state, along with any Media.trackVars and Media.trackEvents you’ve defined. This method is used within Media.monitor.

See Measuring Additional Metrics using Media.monitor.

Call Media.open and Media.play on the video before calling this method. This method takes the following parameter:

  • mediaName: The name of the video. This must match the name used in Media.open.

This method is the only way to send additional variables while the video is playing. It resets the seconds interval and percent milestone counters to zero to prevent multiple tracking hits.