Title: Google AMP: Overview and setup
Author: staff
Published: August 1, 2022
Last modified: November 26, 2025

---

 1. [Installation resources](https://docs.parse.ly/installation-resources/)
 2. [Add-on Features](https://docs.parse.ly/installation-resources/add-on-features/)
 3. Google AMP: Overview and setup

#  Google AMP: Overview and setup

Parse.ly is collaborating with Google on their [Accelerated Mobile Pages Project](https://www.ampproject.org/)(
AMPP or AMP for short). AMP is an open-source initiative to improve the mobile web
experience by allowing web pages to load instantly on mobile devices.

Pages optimized with AMP HTML can be tracked in your existing Parse.ly account by
adding the appropriate `amp-analytics` tag to your pages:

    ```lang-php
    <amp-analytics type="parsely">
    <script type="application/json">
      {
        "vars": {
          "apikey": "YOUR Site ID (apikey) GOES HERE"
        }
      }
    </script>
    </amp-analytics>
    ```

Please ensure you set the `apikey` variable above to the appropriate value for your
account. It is the same string as the Parse.ly Site Id (e.g. `mysite.com`) you use
for the [basic integration](https://docs.parse.ly/parsely-integration/).

## Unique Visitor Duplication

When using the AMP Content Delivery Network (CDN), visitor IDs are generated using
a different method than that of the standard Parse.ly JavaScript tracker. As a result,
a reader who visits example-publisher.com and then views a page on cdn.ampproject.
org will be counted as two visitors instead of one. We account for this fact in 
our calculation of new vs. returning visitors.

If you are hosting AMP pages on your domain and not the AMP CDN, Parse.ly will use
the existing visitor ID, and no duplicate counting will occur.

## Embedded Video iFrames

**Note**

Video tracking is available on AMP pages, but the [video starts](https://docs.parse.ly/installation-developer-resources/parsely-integration/test-integration/#h-videostart)
will appear in the Website [channel](https://docs.parse.ly/dashboard/traffic-menu/channels-tab/)
instead of the AMP channel.

If you use embedded video iframes on AMP pages, you’ll need to pass an `ampid` parameter
so that Parse.ly correctly attributes video events to the AMP channel. The snippet
below demonstrates how to set this parameter via `PARSELY.updateDefaults()` in the
iframe’s page. If your iframe is also used outside of AMP, you can wrap this logic
in a simple check so `ampid` is only set on AMP pages.

    ```lang-html
    <script>
      window.PARSELY = window.PARSELY || {
        autotrack: false,
        config: {
          heartbeat_should_honor_autotrack: true
        },
        onload: function() {
          // If you're sure this page is always embedded in AMP:
          PARSELY.updateDefaults({
            ampid: '{"id":"' + PARSELY.config.uuid + '"}'
          });

          // Otherwise, set ampid conditionally:
          // if (isAMP) {
          //   PARSELY.updateDefaults({
          //     ampid: '{"id":"' + PARSELY.config.uuid + '"}'
          //   });
          // }
        },
        video: {
          onPlay: function(playerApi, videoId, metadata) {
            PARSELY.video.trackPlay(videoId, metadata, document.referrer);
          }
        }
      };
    </script>
    <!-- Insert your Parse.ly tracker here -->
    ```

## FAQ

### Is AMP tracking supported via the WordPress plugin?

Yes, see [this FAQ for details](https://docs.parse.ly/plugin-common-questions/#h-is-wp-parsely-compatible-with-amp-facebook-instant-articles-or-google-web-stories).

### Can I add Parse.ly AMP tracking via Google Tag Manager?

Yes, following [the Google Tag Manager AMP container instructions](https://docs.parse.ly/google-tag-manager/).

### How can I verify that my AMP pages are tracking properly in Parse.ly?

If you’re tracking AMP pages properly, you’ll see data in the “Channels” section
of your dashboard ([https://dash.parsely.com/example.com/channels/amp](https://dash.parsely.com/example.com/channels/amp)).
Email [support@parsely.com](https://docs.parse.ly/installation-resources/add-on-features/support@parsely.com?subject=AMP%20Verification)
if you need help debugging your implementation.

### Can I see engaged time stats for AMP?

Yes. AMP engaged time support was enabled on May 8th, 2018.

### Do I need to provide metadata on AMP pages?

No. As a rule, the Parse.ly Crawler does not retrieve data from AMP pages. Instead,
when it encounters an AMP page, it will follow the URL in the `<link rel="canonical"
>` tag as the [Parse.ly canonical URL](https://docs.parse.ly/the-parsely-canonical-url/).
For more on how the tracker groups URLs across platforms, see [“How does the crawler handle posts with multiple URLs?”](https://docs.parse.ly/crawler/).

Last updated: November 26, 2025