Page Tracking (AMP)

If you are using Piano Audience Intelligence (AI) and AMP (Accelerated Mobile Pages), you can set extra metadata in your AMP configuration to ensure that Piano AI is able to capture your AMP traffic effectively.

This data tracking tag should to be set on all AMPs.

Please note that you will need a unique VX production application ID (AID) to implement AI page tracking in AMPs; you can contact your Piano account representative to receive yours.

Sample Tracking Code

The full sample tracking code would be:

<amp-analytics type="piano">
  <script type="application/json">
    "vars": {
      "aid": "AIDAIDAID",  // Replace with your AID
      "contentCreated": "2015-02-16T05:00:00",
      "contentSection": "Sports",
      "contentAuthor": "John Higgins",
      "tags": ["sports"]
    "triggers": {
      "trackPageview": {
        "on": "visible",
        "request": "pageview"

Published Date

The published date should be an ISO 8601-formatted string that includes the published date and time of the content, local to your website's timezone. For instance, a piece of content that was published at 4am in New York on April 3rd, 2014 would set:

As per the ISO-8601 specification, if no timezone indicator is present, the date and time is interpreted as local time. Local time is local to the application’s configured timezone, not Piano's. The published date is optional and not required for page tracking to function properly.


The author field should contain a string of the author that published the content. The author field is optional and not required for tracking to function properly.


The section field should contain the section that the content is a part of. The section field is optional and not required for tracking to function properly.