Configure Video Tracking Settings
Use our JavaScript configuration variables to fine-tune your video tracking settings.
Similar to the configuration variables listed in our integration guide for standard web tracking, review these variables to determine if they are needed for your integration.
Disable auto-tracking of all video players
This variable can be set to false to prevent our video tracker from automatically tracking all <video>
elements on a page. We recommend this setting for all video tracking integrations where your player object is pushed to _cbv in order to prevent additional video elements (ad units for example) from being detected and tracked automatically by chartbeat_video.js.
Field Name
Value Type
Default Value
Max Length
Example Value
autoDetect
boolean
true
N/A
false
Example usage:
Set video type to Ooyala
Use this variable only if your implementation makes use of our plug-and-play Ooyala integration.
Field Name
Value Type
Default Value
Max Length
Example Value
videoType
text
None
None
ooyala
Example usage:
Define video sections
Use this variable only if your team prefers to pass a page's section(s) data to the Video Dashboard as the section values associated for videos on that page. This variable is not recommended for most integrations.
Field Name
Value Type
Default Value
Max Length
Example Value
videoPageGroups
boolean
false
N/A
true
Example usage:
Track videos in an iframe
This variable is required for our video tracker to properly identify videos embedded within iframes. It should be assigned to the full domain name, including subdomain, of the site your iframe embedded video file is hosted on.
Field Name
Value Type
Default Value
Max Length
Example Value
playerdomain
text
None
None
player.site.com
Example usage:
Additional iframe instructions
If you deploy your video player in an iframe on your website pages, you will need to (A) load chartbeat_video.js within the iframe, and (B) load chartbeat.js on the parent page with the playerdomain variable set to the full subdomain of your iframe embedded video content.
Step 1: Add chartbeat_video.js in the iframe
In the iframe content page where the player loads, include the Chartbeat Video tracker like so:
Step 2: Set the playerdomain variable
On the main page—not within the iframe—add the following line into the existing Chartbeat code configuration section:
As an example: Let's say you have a video link on your homepage, and that link opens an iframe with a video player in it. Also, let's say that video player is hosted on a subdomain, media.yoursite.com. Your Chartbeat Publishing code on the homepage must then include the following line:
Checking your Work
Your Chartbeat code within the iframe should look like:
The Chartbeat code on the parent page (outside the iframe) should look like:
Next steps
Review our integration QA instructions article for best practice advice to test your integration.
Last updated