Brightcove Video Tracking Tag Plugin
The Brightcove video tracking plugin for the Oracle Infinity Tag provides the following features:
- Track a Brightcove player hosted on your site.
- 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 clip views, view duration, pause, play, next, and previous clip clicks for embedded videos
- Extensive debug messaging via _ora.debug=vvv in the browser console
Requirements
- Use the latest version of the Brightcove player.
- Use Brightcove's default video object names, which are set in the configurable
playerId
option. Modifying Brightcove's default video object names is the most common reason for video tracking to fail.
Modes
The Brightcove tag plugin has the following modes:
- Dynamic: Dynamically insert videos into the markup.
- 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 mode example
Dynamic mode video insertion should be used if the video is dynamically inserted into the DOM. The Brightcove tag plugin scans the markup on a regular basis and binds to any new videos.
setTimeout(function(){
var html = "";
html += ' <video data-account="1571595843001" data-video-id="4974033989001" data-player="41ecSd4l2x" data-embed="default" class="video-js" controls height="357" width="635" autoplay=""></video>';
$("#videoDiv").html(html);
$('#home_video')[0].load();
},1500);
setTimeout(function(){
$('#home_video').remove();
},2500);
setTimeout(function(){
var html = "";
html += ' <video data-account="1571595843001" data-video-id="4974033989001" data-player="41ecSd4l2x" data-embed="default" class="video-js" controls height="357" width="635" autoplay=""></video>';
$("#videoDiv").html(html);
$('#home_video')[0].load();
},3500);
Standard mode example
When the page loads in standard mode, the Brightcove tag plugin scans the page for any video that is in the markup and binds to it.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Video Test Page</title>
</head>
<body>
<div class="videoplayer">
<video data-account="1571595843001" data-video-id="4974033989001" data-player="41ecSd4l2x" data-embed="default" class="video-js" controls height="357" width="635" autoplay=""></video>
<script src="//players.brightcove.net/1571595843001/41ecSd4l2x_default/index.min.js"></script>
<script src="//players.brightcove.net/1719543778001/vttjs/dist/vtt.min.js"></script>
</div>
</body>
</html>
Parameters
The Brightcove tag plugin can send the following Oracle Infinity parameters:
Parameter | Name | Description |
---|---|---|
wt.clip_accountid | Brightcove account ID | wt.clip_accountid provides the unique ID of the Brightcove account. |
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_video_id | Brightcove video ID | wt.clip_video_id provides the unique ID of the Brightcove video. |
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. |
wt.player_id | Brightcove playlist ID | wt.player_id provides the unique ID of the Brightcove playlist. |
Configuration options
The default Brightcove 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 rate 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. |
beaconCurve | array | An array of values to use for curvilinear beaconing, such as the following default value:
{
60:10,
120:20,
300:30,
420:45,
600:60,
1800:150
}
|
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. |
beaconType | string | The type of beacon, which can be one of the following:
|
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 . |
enable | boolean | Enables the Brightcove tag plugin when set to true (the default) |
fixed | Uses the beacon duration for all | |
load | boolean | When set to true , load events are tracked and wt.clip_ev:Load is generated.The default value is |
loadMeta | boolean | When set to true (the default), loaded meta events are generated:
When set to |
maxBinds | integer | Sets the maximum number of binds to video objects per page. The default value is 10. |
mediaTags | string | Used for sending custom media tag data. Brightcove supports a rich set of media tags that are sent with the video metadata, which can have two video tag formats:
|
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 |
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. |
playerId | string | The Brightcove ID for the player, which sets the selector string to identify videos. The default value is: div[id^='vjs_video']:not([id$='_api']):not([id*='_component']) For custom player implementation, this selector string may need to be adjusted based on how you identify videos in the markup. |
poll | boolean | When set to true , the Brightcove 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. |
postMessage | boolean | When set to true , the Brightcove tag plugin sends data via postMessage instead of the tracking call. The default value is false . |
preProcess | Callback to preprocess the data before its sent to the tracking call | |
quartile | boolean | When set to true (the default value), the Brightcove 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:
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 |
seek | boolean | When set to true (the default value), seek events are tracked and the Brightcove 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. |
transformCallback | Adds in a transform so the data can be customized before sending (standard Oracle transform) | |
volume | boolean | When set to true (the default value), volume events are tracked and the Brightcove 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 onload autoplay data output network call
dcsdat:1497915126398
dcssip:localhost
dcsuri:/host/AnaBasic.html
wt.bh:16
wt.bs:1578x150
wt.cd:24
wt.ce:2
wt.clip_accountid:1571595843001
wt.clip_ct:application%2Fvnd.apple.mpegurl
wt.clip_duration_n:360-375
wt.clip_ev:Play
wt.clip_id:4974033989001
wt.clip_mode:FixedDuration
wt.clip_n:Adafruit%20Circuit%20Playground%20%E2%80%93%20Another%20Geek%20Moment
wt.clip_perc:0
wt.clip_player:Brightcove%20vjs
wt.clip_player_ver:5.20.1
wt.clip_res:357x635
wt.clip_t:HTML5
wt.clip_tv:1.0.3
wt.clip_video_id:4974033989001
wt.co_f:6d601111-9621-4eab-93db-cd340527dbd2
wt.ct:unknown
wt.dl:1
wt.es:localhost%2FAnaBasic.html
wt.jo:No
wt.js:Yes
wt.le:UTF-8
wt.player_id:41ecSd4l2x
wt.pn_sku:brent%3BmyTest%3Bwebtrends
wt.sr:1920x1200
wt.srch:1
wt.ssl:0
wt.ti:Analytics%20Tag%20Testing
wt.tv:1.0.2
wt.tx_custom:lets%3Bgo%3Bpens
wt.tx_i:123456
wt.tx_s:19.99%3B20.00%3B50.98
wt.tx_type:buy%3Bbuy%3Brent
wt.tx_u:1%3B5%3B2
wt.tz:-7
wt.ul:en-US
wt.vt_f_tlh:1497915124
wt.vtid:6d601111-9621-4eab-93db-cd340527dbd2
wt.vtvs:1497914552813
wt.clip_tag_adafruit:0
wt.clip_tag_another geek moment:0
wt.clip_tag_function:eval%2Fdev%20tool
wt.clip_tag_industry:transportation
wt.clip_tag_lang:en
wt.clip_tag_producttype:semiconductors & dev tools
wt.clip_tag_site:global
wt.clip_tag_supplierid:1528
wt.clip_tag_techzone:%20microcontroller%20solutions
wt.clip_tag_videotype:another%20geek%20moment
Sample beacon values
wt.clip_ct:mp4
wt.clip_duration:20
wt.clip_duration_min:20
wt.clip_duration_n:30
wt.clip_ev:Beacon
wt.clip_id:Oceans.mp4
wt.clip_mins:2.1
wt.clip_mode:Fixed
wt.clip_n:Infinity Promo Video
wt.clip_perc:25
wt.clip_player:html5
wt.clip_player_res:250x200
wt.clip_provider:www/example.com
wt.clip_res:250x200
wt.clip_secs:48
wt.clip_t:html5
wt.clip_tv:10.2.15
wt.clip_vol:33
wt.dl:40
Sample load values
wt.clip_ct:mp4
wt.clip_ev:Load
wt.clip_id:Oceans.mp4
wt.clip_mode:Fixed
wt.clip_n:Infinity Promo Video
wt.clip_player:html5
wt.clip_player_res:250x200
wt.clip_provider:www/example.com
wt.clip_res:250x200
wt.clip_t:html5
wt.clip_tv:10.2.15
wt.clip_vol:33
wt.dl:41
Sample load meta values
wt.clip_ct:mp4
wt.clip_ev:Loadmeta
wt.clip_id:Oceans.mp4
wt.clip_mode:Fixed
wt.clip_n:Infinity Promo Video
wt.clip_player:html5
wt.clip_player_res:250x200
wt.clip_provider:www/example.com
wt.clip_res:250x200
wt.clip_t:html5
wt.clip_tv:10.2.15
wt.clip_vol:33
wt.dl:41
Sample pause values
wt.clip_ct:mp4
wt.clip_duration:20
wt.clip_duration_min:20
wt.clip_duration_n:30
wt.clip_ev:Pause
wt.clip_id:Oceans.mp4
wt.clip_mins:2.1
wt.clip_mode:Fixed
wt.clip_n:Infinity Promo Video
wt.clip_perc:25
wt.clip_player:html5
wt.clip_player_res:250x200
wt.clip_provider:www/example.com
wt.clip_res:250x200
wt.clip_secs:48
wt.clip_t:html5
wt.clip_tv:10.2.15
wt.clip_vol:33
wt.dl:40
Sample play values
wt.clip_ct:mp4
wt.clip_ev:Play
wt.clip_id:Oceans.mp4
wt.clip_mode:Fixed
wt.clip_n:Infinity Promo Video
wt.clip_player:html5
wt.clip_player_res:250x200
wt.clip_provider:www/example.com
wt.clip_res:250x200
wt.clip_t:html5
wt.clip_tv:10.2.15
wt.clip_vol:33
wt.dl:40
Sample quartile values
wt.clip_ct:mp4
wt.clip_duration:20
wt.clip_duration_min:20
wt.clip_duration_n:30
wt.clip_ev:Pause
wt.clip_id:Oceans.mp4
wt.clip_mins:2.1
wt.clip_mode:Fixed
wt.clip_n:Infinity Promo Video
wt.clip_perc:25
wt.clip_player:html5
wt.clip_player_res:250x200
wt.clip_provider:www/example.com
wt.clip_res:250x200
wt.clip_secs:48
wt.clip_t:Fhtml5
wt.clip_tv:10.2.15
wt.clip_vol:33
wt.dl:40
Sample resume values
wt.clip_ct:mp4
wt.clip_duration:20
wt.clip_duration_min:20
wt.clip_duration_n:30
wt.clip_ev:Resume
wt.clip_id:Oceans.mp4
wt.clip_mins:2.1
wt.clip_mode:Fixed
wt.clip_n:Infinity Promo Video
wt.clip_perc:25
wt.clip_player:html5
wt.clip_player_res:250x200
wt.clip_provider:www/example.com
wt.clip_res:250x200
wt.clip_secs:48
wt.clip_t:html5
wt.clip_tv:10.2.15
wt.clip_vol:33
wt.dl:40
Sample seek values
wt.clip_ct:mp4
wt.clip_duration:20
wt.clip_duration_min:20
wt.clip_duration_n:30
wt.clip_ev:Seek
wt.clip_id:Oceans.mp4
wt.clip_mins:2.1
wt.clip_mode:Fixed
wt.clip_n:Infinity Promo Video
wt.clip_perc:25
wt.clip_player:html5
wt.clip_player_res:250x200
wt.clip_provider:www/example.com
wt.clip_res:250x200
wt.clip_secs:48
wt.clip_t:html5
wt.clip_tv:10.2.15
wt.clip_vol:33
wt.dl:40
Brightcove player API documentation