HTML5 Video Tracking Tag Plugin

The HTML5 video tracking plugin for the Oracle Infinity Tag provides the following features:

  • A multi-threaded scalable and configurable video reporting tool for use with the Oracle Infinity Tag
  • Track multiple video objects on a page.
  • Dynamically attach to any video object that is inserted into the markup.
  • Extensive configuration options, including events such as views, view duration, and play
  • Extensive configuration options
  • Supports standard HTML5 video objects
  • Extensive debug messaging via _ora.debug=vvv in the browser console

Note: For more details about this implementation, contact your Oracle Infinity solutions consultant.

Requirements

  • HTML5 compliant browser: If the visitor's browser does not support the HTML5 VIDEO attribute, the HTML5 video tracking tag plugin exits without sending track events. This will not affect the ability of the Oracle Infinity Tag or other plugins to send track events on a page.
  • Event handlers must be active on the page before the video loads:
    • When using Standard mode, the HTML5 video tracking tag plugin code must be loaded before a supported video is loaded in the markup. If the plugin is loaded after the video, it will miss the load and potentially the loaded meta event. You should include the plugin code toward the top of your web page.
    • Alternatively, use Poll mode to create pseudo-events for the missing load events when the first event is received.

Note: For more details about this implementation, contact your Oracle Infinity solutions consultant.

Modes

The HTML5 video tracking tag plugin has the following modes:

  • Dynamic: Dynamically insert videos into the markup. Use this mode to create pseudo-events if the video does not load before the HTML5 video tracking tag plugin code for the missing load events when the first event is received.
  • Standard: Videos to be tracked are in the markup when the page loads. Use Standard mode if you are not dynamically inserting videos into the markup. Standard mode is not recommended for implementations where dynamic video insertions are used, because it will not reliably bind to the videos if they are dynamically inserted after the tag has loaded.

Dynamic video insertion example

Dynamic mode video insertion should be used if the video is dynamically inserted into the DOM. The HTML5 video tracking tag plugin scans the markup on a regular basis and binds to any new videos.

Standard mode example

When the page loads in standard mode, the HTML5 video tracking tag plugin scans the page for any video that is in the markup and binds to it.

Parameters

The HTML5 video tracking tag plugin can send the following Oracle Infinity parameters:

Parameter Name Description
wt.clip_ct Video content type wt.clip_ct indicates the video's content type, such as MOV.
wt.clip_duration Duration in seconds wt.clip_duration indicates the video duration in seconds.
wt.clip_duration_min Duration in minutes wt.clip_duration_min indicates the video duration in minutes.
wt.clip_duration_n Duration based on range wt.clip_duration_n indicates the range of the video duration in seconds.
wt.clip_ev Media event identifier wt.clip_ev identifies the type of media-related event that has occurred, such as v for a view event.
wt.clip_id Video identifier wt.clip_id indicates the unique ID of the video asset.
wt.clip_mins Playhead in minutes wt.clip_mins indicates the video's playhead position in minutes.
wt.clip_mode Mode type wt.clip_mode identifies the mode type of video, such as fixed, streaming, FullScreenOn, or FullScreenOff.
wt.clip_n Video name wt.clip_n identifies the name of the video that was accessed.
wt.clip_perc Percentage played wt.clip_perc identifies the percentage of the video that the viewer has played.
wt.clip_player Player name wt.clip_player identifies the name of the video player.
wt.clip_player_res Player resolution wt.clip_player_res indicates the video player's resolution in pixel height x width.
wt.clip_provider Video provider WT.clip_provider indicates the host on which the video is located
wt.clip_res Video resolution wt.clip_res indicates the resolution of the video expressed as height x width in pixels.
wt.clip_secs Playhead in seconds wt.clip_secs indicates the video's playhead position in seconds.
wt.clip_src Video URL wt.clip_src provides the URL of the video.
wt.clip_t Media type wt.clip_t identifies the type of media, such as Flash or HTML5, depending on what type of player is being used.
wt.clip_tag_tagName Video tag name wt.clip_tag_tagName provides the video tag name.
wt.clip_tags Video tags wt.clip_tags provides a list of one or more semicolon-delimited video tags.
wt.clip_tv Video tag plugin version wt.clip_tv provides the version of the video tag plugin.
wt.clip_vol Volume level wt.clip_vol provides the volume of the video on a scale from 1 through 100.
wt.dl Event tracking wt.dl specifies a numeric identifier for the kind of event tracked, which are used for event-level filtering and reporting.

Configuration options

The default HTML5 video tracking tag plugin options are set to the most commonly requested configuration. However, you can customize the configuration for your needs when required.

Important: Video tracking can create a high volume of server calls depending on the configured events. For example, if you set the beacon to send every 10 seconds, the video is 10 minutes, and you have 100 users: 60 * 100 = 6000 server calls for one event.

Sample configuration block for the loader, which is visible in ODC.js:

"config" : { "ora-plugins" : { bc: {beacon:true,beaconRate:90,load:false,loadMeta:false} } }*

Optional configuration properties

Option Data type Description
beacon boolean When set to true (the default), a time beacon event is sent every beaconRate seconds. If only quartile reporting is needed, set this option to false to disable beacon tracking. See a data output sample.
beaconRate integer The interval between beacons in seconds values (from 0 through 65000). Set this value to the maximum granularity of the reporting you require to make business decisions. The default value is 60.
bins integer Sets a bin range for duration tracking in seconds (from 0 through 65000) for categorizing videos by time duration buckets or bins. The default value is 15. The parameter generated is wt.clip_duration_n.
load boolean When set to true, load events are tracked and wt.clip_ev:Load is generated. The default value is false. See a data output sample.
loadMeta boolean When set to true (the default), loaded meta events are generated:

When set to false, loaded metadata events are not generated.

See a data output sample.
nameCallback string Callback to set a custom video name generation method. The callback is passed the video node that is being tracked and expects a string (name) to be returned. You can use this configuration option to use an alternate naming collection or determination method. The default is null.

Example:

nameCallack:function(e){
    return e.getAttribute("data-name") || 'unknown';
} 

Note: HTML5 does not have a strong asset naming mechanism. The name attribute is not typically available in the meta content, so the plugin uses the name attribute in the <VIDEO> tag if it exists, then falls back to the file name.

pause boolean When set to true (the default), pause and resume events are tracked and wt.clip_ev:Pause and wt.clip_ev:Resume parameters are generated. See a data output sample.
pctInc integer Sets the quartile tracking percentage increments, which is expressed as an integer from 0 through 100. For dectile tracking (every 10 percent), set this option to 10. The default value is 25.
poll boolean When set to true, the HTML5 video tracking tag plugin polls for videos that are dynamically inserted in the markup. The default value is false.
pollRate integer Sets the polling interval for a new video in milliseconds. The default value is 250.
quartile boolean When set to true (the default value), the HTML5 video tracking plugin uses quartile event tracking and the player will send data at quartile points defaulted to 25, 50, 75, and 100%. See a data output sample.

The calculation for quartile is:
(current position / video duration)*100

wt.clip_secs = (Math.floor(((e.currentTime) * 100) / 1) / 100);
wt.clip_perc = Math.floor((e.currentTime / e.duration ) * 100);
wt.clip_perc = Math.floor(WT.clip_perc / config.pctInc) * config.pctInc;
screenMode boolean When set to true (the default value), the HTML5 video tracking tag plugin generates the wt.clip_ev:FullScreenOn event when the screen mode is changed.
seek boolean When set to true (the default value), seek events are tracked and the HTML5 video tracking tag plugin generates wt.clip_ev:Seek parameters. See a data output sample.
trackCallback string Modifies the tracking callback function from an Infinity ORA.click call to use a custom method. For details, see the samples.
volume boolean When set to true (the default value), volume events are tracked and the HTML5 video tracking tag plugin generates wt.clip_ev:Volume and wt.clip_vol:level parameters.

Sample implementations

trackCallback samples

To send data via Tealium:

trackCallback:function(s){ 
    utag.data.event_type='video';
   var mergedUDO=jQuery.extend(utag.data,states.data.wt);
    utag.link(mergedUDO);
};

To send data via postMessage:

trackCallback: function (t) {
    var payload = JSON.stringify({action: 'MultiTrack', data: [t.argsa]});
    _window.parent.postMessage(payload, "*");
};

The following objects are passed to the callback function:

element: this,                       // current environment
argsa: tags,                         // Infinity tags to be sent
transform: config.transformCallback, // transform for legacy v10 tag
data: states.data.wt,                // raw tag data in form ["wt"].['clip_*] format
videoEle: e                          // video element reference that's created the event

Sample beacon values

Sample load values

Sample load meta values

Sample pause values

Sample play values

Sample quartile values

Sample resume values

Sample seek values

Errors

The HTML5 video tracking tag plugin can send the following error messages via the wt.clip_ev parameter.

Error wt.clip_ev value
MEDIA_ERR_ABORTED Error: You aborted the video playback.
MEDIA_ERR_DECODE Error: The video playback was aborted due to a corruption problem or because the video used features your browser did not support.
MEDIA_ERR_NETWORK Error: A network error caused the video download to fail part-way.
MEDIA_ERR_SRC_NOT_SUPPORTED Error: The video could not be loaded, either because the server or network failed or because the format is not supported.
OTHER Error: An unknown error occurred.

Learn more

Infinity Module Plugins