Skip to content

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.

  1. Choose a player from your Brightcove studio dashboard to edit.
  2. Find the “Plugin” panel on the player page, and click “Edit”.
  3. 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
  1. Click to expand the “Name, Options (JSON)” section.
    1. Set the “Plugin Name” to parselyLoader.
    2. Add plugin options as described below.
  2. Save changes.
  3. 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

ParameterTypeDescription
apikeystringThe “site identifier” used by Parse.ly, which should match the Site ID (apikey) in your standard tracker. If not specified, apikeyMappings should be.
apikeyMappingsarrayUsed 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.
autodetectApikeybooleanSpecifies 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.
debugbooleanWhen set to true, loads an un-minified version of the parsely plugin. Defaults to false.
iframeOnlybooleanWhether the plugin should only track videos within <iframe> elements. Defaults to true to avoid interfering with the standard tracker.
pinVersionbooleanWhen 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.
parselyPluginSrcstringSpecifies a specific URL/version of the parsely plugin to load. Should only be used when instructed by your Parse.ly account manager.
trackerSrcstringSpecifies 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, if blog.parsely.com and parsely.com have separate Site IDs, they’d need to be specified in that order, to avoid matching parsely.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 in apikeyMappings 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:

ParameterTypeRequiredDescription
domainstringyesA substring of the hostname that is specific to a given Site ID (apikey).
apikeystringyesThe Site ID used by Parse.ly, which should match the Site ID (apikey) used in your standard tracking script.

Last updated: June 03, 2024