Video Tracking: Brightcove Plugin setup
The standard Parse.ly tracker can automatically detect and track Brightcove videos that are embedded directly on the tracked page as <video>
elements. However, by installing the Brightcove plugin, you can also track Brightcove videos embedded with <iframe>
elements or inserted via the Brightcove Accelerated Mobile Pages (AMP) component.
Getting Started with the Brightcove Integration
Contact us first
Proper activation of the Brightcove plugin requires changes to your Parse.ly configuration. Please contact your account manager before starting the installation process below.
For general information on how to install and configure plugins, see Brightcove’s documentation.
- Choose a player from your Brightcove studio dashboard to edit.
- Find the “Plugin” panel on the player page, and click “Edit”.
- Click “JavaScript” to expand that section, and paste the link to the latest version of the plugin:
https://cdn.parsely.com/parse-ly-video-tracking/plugins/brightcove/parse-ly-video-tracking/js-parsely-loader-v1-latest.min.js
- Click to expand the “Name, Options (JSON)” section.
- Set the “Plugin Name” to
parselyLoader
. - Add plugin options as described below.
- Set the “Plugin Name” to
- Save changes.
- Republish player.
Brightcove player changes may take time
Each time you update and publish a Brightcove player, all plugin files are collected and re-bundled to be distributed with the player files. However, these changes may take a while to propagate across Brightcove’s content delivery network (CDN), sometimes up to 24 hours. To test whether a Brightcove player on your site currently has the Parse.ly plugin installed, use the developer console to search the page for the
vjs-parsely
class. If it’s present, the plugin is active and installed on that player. If it’s missing, that means the plugin isn’t installed, or that the new installation hasn’t yet taken effect.
Configuring the Brightcove Plugin Options
The configuration options for Brightcove plugins are formatted as JSON.
Example Configuration – Standard
For standard integrations, where a Brightcove player is associated with just a single Parse.ly Site ID (apikey
), that’s the only option necessary:
{
"apikey": "example.com"
}
Example Configuration – Shared Player
For more complicated setups, where a single player is shared by several different sites and Site IDs, you need to provide additional information about how the plugin should determine the Site ID (apikey
) (see “Available Options” and “Formatting apikeyMappings” below for detailed specifications):
{
"apikeyMappings": [
{
"domain": "blog.parse.ly",
"apikey": "blog.parsely.com"
},
{
"domain": "parse.ly",
"apikey": "parsely.com"
}
]
}
Available Options
Parameter | Type | Description |
---|---|---|
apikey | string | The “site identifier” used by Parse.ly, which should match the Site ID (apikey ) in your standard tracker. If not specified, apikeyMappings should be. |
apikeyMappings | array | Used in cases where a single Brightcove player is shared across multiple sites with different Parse.ly Site IDs or apikeys. An array of objects that associates each possible domain with its corresponding Parse.ly apikey . For details, see “Formatting apikeyMappings” below. |
autodetectApikey | boolean | Specifies whether the plugin should attempt to derive the Site ID (apikey ) from the page domain at runtime if no apikey is specified and no apikeyMappings are matched. Defaults to false . |
debug | boolean | When set to true, loads an un-minified version of the parsely plugin. Defaults to false . |
iframeOnly | boolean | Whether the plugin should only track videos within <iframe> elements. Defaults to true to avoid interfering with the standard tracker. |
pinVersion | boolean | When set to true, it will always load the same version of the parsely plugin that was specified by the JavaScript URL, rather than the latest major version. Defaults to false . |
parselyPluginSrc | string | Specifies a specific URL/version of the parsely plugin to load. Should only be used when instructed by your Parse.ly account manager. |
trackerSrc | string | Specifies a specific URL/version of the parsely tracker to load. Should only be used when instructed by your Parse.ly account manager. |
Formatting apikeyMappings
Domains will always be checked for matches in the order specified. Specific
domain
strings should precede more general strings. (For example, ifblog.parsely.com
andparsely.com
have separate Site IDs, they’d need to be specified in that order, to avoid matchingparsely.com
first. See the “Shared Player example] above.)You can also optionally specify an
apikey
, which will be used as the fall-back if none of the domains inapikeyMappings
are matched.
This optional parameter allows you to provide to associate particular domain patterns with Parse.ly Site IDs (apikeys). The format is a list of objects with these parameters:
Parameter | Type | Required | Description |
---|---|---|---|
domain | string | yes | A substring of the hostname that is specific to a given Site ID (apikey ). |
apikey | string | yes | The Site ID used by Parse.ly, which should match the Site ID (apikey ) used in your standard tracking script. |
Last updated: June 03, 2024