Installation Snippet

The installation snippet is the <script> tag of JavaScript presented by Center to initiate and expose the center tracking on the page. We recommend that this script be placed into the <head> of the pages to be tracked.

  center('create', 'YOUR_PID_GOES_HERE', 'SiteName', {
    captureEmailForms: true
  center('SiteName.send', 'view');

This code does four things:

  1. Creates a <script> element that starts asynchronously downloading the center.js JavaScript library from

  2. Initializes a global center function called the center command queue that allows you to schedule commands to be run once the script has loaded.

  3. Adds a command to create a new property specified via the ‘YOUR_PID_GOES_HERE’ parameter. Optionally sets any global flags on the script.

  4. Adds another command to send a view to Center for the current page.