Tech docs
Integration Docs
Google AMP

Google AMP

Parse.ly is collaborating with Google on their Accelerated Mobile Pages Project (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:

<amp-analytics type="parsely">
<script type="application/json">
    {
        "vars": {
            "apikey": "YOUR 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.

#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.

#FAQ

#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). Email support@parsely.com 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. For more on how the tracker groups URLs across platforms, see "How does the crawler handle posts with multiple URLs?".

rocket emoji