The script is deployed to your content sites for Pressboard Analytics measurement and/or Ceros events tracking.
- Click on your User profile in the top-right corner, then click on 'Settings'
- Click on the ‘Data Sources’ tab
- Click on 'Add' to access all Data Sources and connection points
- From the list, select Pressboard Analytics and 'Add Connection' to create the code
- Enter a name for your code and time zone and finally hit 'Save'
- You will land back on the first step. To retrieve the code click on the <...> icon for additional instructions.
If using GTM, ensure the parent frame has access.
Our script can also be injected via Google Tag Manager but script must be allowed access to parent frame in order to fire as expected on the page(s).
Note each code generated form your account contains a unique 6 digit Media ID.
The following sample snippets use 'XXXX' in place of a unique ID. You can retrieve your unique code by following the steps outlined above on creating your code in Data Sources.
Add this code to the <head></head> section of your page. This code captures the page analytics.
Add this code to allow our script to collect Ceros Universal Analytics, one of our newest integrations. Recommended, if you’re using Ceros to report on interactive content.
Scroll Tag (required)
Add this code right at the end of the content of the post. This code measures how far down a page a viewer scrolls for viewability metrics.
Additional codes, only use IF APPLICABLE
Infinite Scroll and SPA
Subsequently, for every URL that you want to track, you set the story. If you don't pass in a URL, the script will use the window location.
pbq('set', 'story' [, URL]);
We recommend that you set the story every time the URL changes, so that measurement for the previous URL stops. If you don't, the script will continue to track engagement as though the user is still on the previous URL.
Alternatively, to track engagement on infinite scroll and SPA sites, you can turn on auto tracking. The script will monitor URL changes and adjust accordingly. You only need to do this once when the site loads.
pbq('set', 'autotrack', true);
Accelerated Mobile Pages (Google AMP)
Add this code to your AMP pages to capture Pressboard Analytics data. For more information click here.
<amp-analytics type="pressboard" config="https://sr.studiostack.com/amp/config?media=XXXXX&ref=CANONICAL_URL&rand=RANDOM"></amp-analytics>