AMP Configuration Variables
Available Chartbeat configurations to be passed into your AMP implementation code.
Introduction
The page property metadata (sections, authors, path, title, and content type) configured to send from your AMP pages should match exactly the data we receive from those same pages on your non-AMP website via our standard JavaScript tag, and stay consistent across all of your other Chartbeat tracked platforms. This is important to ensure accurate page-level engagement tracking in your team's Chartbeat dashboards and audience reports.
Required AMP variables
These variables must be set in your snippet for data to appear in your dashboards.
Field Name | Description | Example Input |
| A five-digit numerical value associated with your Chartbeat account. |
|
| This value should be set to the site id of your website as it appears in your Chartbeat account homepage. This is usually the root domain without http or 'www.' prepended. |
|
For more information on setting the UID and domain variables, see our customize tracking settings article within our integration guide for non-AMP sites.
Recommended AMP variables
Field Name | Description | Example Input |
| Accepts a comma separated list of values for the page's section(s). |
|
| Accepts a comma separated list of values for the page's author(s). |
|
Tip: Chartbeat uses the "|" character for a splitting process when organizing section and author values, so it is recommend to avoid this character when defining these variables.
Example usage:
These variables accept one or multiple string values parsed by comma, so the examples directly above and below would both be acceptable formats.
Additional AMP variables
Field Name | Description | Example Input |
| By default, our tracker collects the page path from the |
|
| By default, our tracker collects page titles from the |
|
| For customers making use of our Advanced Queries tool, this variable accepts a single string value to supplement your Chartbeat historical data with additional information about the type of content a given page falls under, like 'gallery page', 'standalone video page', etc. |
|
| For customers making use of our Advanced Queries tool, this variable accepts a single string value to supplement your Chartbeat historical data with additional information about your sponsored content (advertorial) campaign name IDs, such as 'Mercedes', 'Mastercard-Jun2020', 'Netflix-Q1-2021-CID123', etc. |
|
Example usage:
IP Truncation
For clients in the EU, use the following <amp-analytics> configuration for Chartbeat to override the host parameter and point traffic to our proxy layer that de-identifies IP addresses within the EU:
Next steps
If your team uses Google Tag Manager for your AMP pages, you have the option to use our pre-built Chartbeat for AMP GTM tag template instead of adding our code directly to your AMP HTML. If you do not use Google Tag Manager, you can skip ahead to our integration QA steps article.
Last updated