Implementing Quantcast Measure on AMP Project Pages

Quantcast Measure

Quantcast is collaborating with Google on their Accelerated Mobile Pages project (AMP for short). AMP is an open source initiative to improve the mobile web experience by allowing web pages to load very quickly on mobile devices.

Pages optimized with AMP HTML can be fully tracked in your existing Quantcast account by adding the appropriate amp-analytics tag into the body of your pages, near the top of the the “body” tag:

<amp-analytics type=”quantcast”>
<script type=”application/json”>
  “vars”: {
  “pcode”: “YOUR pcode GOES HERE”,
  “labels”: [“AMPProject”,”optionalAdditionalLabelsHere” ]

Please ensure you set the pcode variable above to the appropriate value for your account. The AMPProject label is required. Other labels are optional but recommended – see below.

Labels (Audience Segments) Implementation
One label is required for AMP this is the first label in the above snippet, “AMPProject”. Other labels are optional but highly recommended. Labels will function on AMP just like they do on web or native app. Implementing labels allows you to segment your audience, for example by author or author and article across all your platforms. You can learn more about labels best practices here. We highly recommend modifying your labels structure so you can drill down to see how the AMP traffic for a given segment may differ in size and audience composition from the non AMP traffic for the same segment. For example authorName > articleName > AMP traffic drill down would be achieved by replacing the “ optionalAdditionalLabelsHere” with the following:


Note: To get cross platform reporting you will need to match the authorName.articleTitle exactly with what you are using in app and web.

Unique Visitor Duplication
When using the AMP Content Delivery Network (CDN), visitor IDs are generated using a different method than that of the standard Quantcast JavaScript tracker. As a result, a unique visitor that visits and then views a page on will be counted as two visitors instead of one. If however you are hosting AMP pages and not using the AMP CDN, Quantcast will use the existing visitor ID and no duplicate counting will occur.

Can I view AMP traffic specifically in Quantcast?
Yes – You can do this by using the labelling approach described above.

Can publishers use macros to populate labels (e.g. if they are already doing this on normal web pages)

Where can I learn more about the AMP project?

Where can I see an example of a properly tagged page?

Where can I learn more about AMP Analytics in general?

Learn more about our advertising solutions.