Using Plugins

Plugins allow for vendor- or context-specific functionality without increasing the core size of the center tracking code. Plugins must first be required, and then can be commanded with the Center Command Queue. Please check the list of supported Plugins for specific details and commands.

Require a Plugin

Adding plugins to your center tracking code is done by calling the require command with the plugin name.

center('require', 'youtube');

The previous example will asynchronously load the youtube plugin into the tracking code. All the commands of the plugin are immediately available on the Center Command Queue, however they will not be executed until the plugin has loaded.

Plugin Commands

Plugin commands must be prefixed with the plugin name and a colon. This allows the center tracking code to discover and route the command correctly.

center('youtube:trackVideo', ...);

This can be combined with Property Targeting but must follow the property name specification.

center('SiteName.youtube:trackVideo', ...);