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.
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.
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). |
|
Example usage:
<amp-analytics type="chartbeat"><script type="application/json">{"vars": {"uid": "12345","domain": "yoursite.com","sections": "News","authors": "John Doe"}}</script></amp-analytics>
These variables accept one or multiple string values parsed by comma, so the examples directly above and below would both be acceptable formats.
<amp-analytics type="chartbeat"><script type="application/json">{"vars": {"uid": "12345","domain": "yoursite.com","sections": "News,Sports","authors": "John Doe,Jane Doe"}}</script></amp-analytics>
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:
<amp-analytics type="chartbeat"><script type="application/json">{"vars": {"uid": "12345","domain": "yoursite.com","sections": "News","authors": "John Doe","canonicalPath": "yoursite.com/article-xyz.html","title": "My Article Title","contentType": "article page"}}</script></amp-analytics>
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.