Brightcove Plugin

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 Parse.ly Brightcove plugin, you can also track Brightcove videos embedded with <iframe> elements or inserted via the Brightcove Accelerated Mobile Pages (AMP) component.

Getting Started

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://d1z2jf7jlzjs58.cloudfront.net/videoplugins/brightcove/videojs-parsely-loader-v1-latest.min.js
    
  4. Click to expand the "Name, Options (JSON)" section.

    1. Set the "Plugin Name" to parselyLoader.
    2. Add plugin options as described below.
  5. Save changes.
  6. 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 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 apikey, that's the only option necessary:

{
  "apikey": "parsely.com"
}

Example Configuration - Shared Player

For more complicated setups, where a single player is shared by several different sites and apikeys, you need to provide additional information about how the plugin should determine the apikey (see "Available Options" 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 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 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 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

Note

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 apikeys, 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 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 apikey.
apikey string yes The "site identifier" used by Parse.ly, which should match the apikey used in your standard tracking script.
Do you have an urgent support question?