Measurement of Accelerated Mobile Pages (AMP)

Accelerated Mobile Pages require a different Analytics tag.

Accelerated Mobile Pages (AMP) is an open source page format for the mobile web that makes it possible for your pages to render almost instantly on mobile devices. AMP pages are similar to HTML pages and load in any browser. However, you cannot use analytics.js on Accelerated Mobile Pages, so a different Analytics tag is provided specifically for AMP.

Analytics data collection is implemented as a layer on top of the Measurement Protocol. User identifiers are randomly generated and stored either in localStorage or cookies. The user identifier is reset when the user clears cookies and local storage. The AMP tag supports IP truncation as described in IP Anonymization in Analytics. Data from AMP documents is always IP anonymized.

AMP Analytics supports the Analytics opt-out. If the opt-out is installed, Analytics data collection is disabled.

Accelerated Mobile Pages allow users to engage with content from a single publisher on multiple sites during the same session. Learn more about session-based metrics collected from Accelerated Mobile Pages.

Use the AMP Analytics tag on your mobile pages. Refer to the AMP Analytics spec on Google Developers.

Capabilities and limitations

AMP Analytics allows you to collect the following data:

Page data: Domain, path, page title

User data: client ID, timezone

Browsing data: referrer, unique page view ID

Browser data: screen height, screen width, user agent

Interaction data: page height and page width

Event data

Analytics for AMP currently has more limited capabilities than standard Analytics; AMP capabilities will be added over time.

Additional considerations

The Google AMP Client ID API was recently launched to improve user analysis across pages served on your domain and AMP pages served within Google viewers. In addition to serving super-fast AMP content on your own domain, AMP content will also be served directly via Google viewers. However, if you don’t use the Google AMP Client ID API, having pages served in at least two contexts—within Google viewers and on your own site—will result in multiple identities for a single user that engages with your content across these two (or more) touch points.

Cache vs. non-cache analysis

If you’d like a deeper understanding of how users interact with AMP pages on cache vs. your own domain, then you can use the following instructions to send that data to Analytics via a custom dimension: