Google Analytics 4 (GA4) has made significant strides in its integration with Accelerated Mobile Pages (AMP), paving the way for more effective data collection. Despite some limitations, the potential for these improvements is vast.
GA4 Announces AMP Support for All Websites
Google Ads Liaison, Ginny Marvin, announced the new support for AMP across all websites in GA4. Marvin indicated,
“Today, we’re rolling out support for AMP in GA4 to all publishers. A simple update to your amp-analytics configuration will enable analytics to start flowing immediately into GA4.”
Details on AMP & GA4 Integration
Despite their similarities to HTML and browser compatibility, AMP pages do not support the gtag.js used in Google Analytics. Instead, an explicitly provided distinct tag for AMP is provided. User identification within AMP also deviates from the norm; in GA4, user identifiers are randomly generated and kept in local storage or cookies. Resetting user identifiers when clearing cookies and local storage negates the need for IP masking since IP addresses are neither logged nor stored in GA4.
Data Collection Requirements
For data collection, the implementation of the AMP Analytics tag is mandatory. This tag facilitates data collection on pages, users, browsing habits, browser information, interactions, and events. Google also mandates that all websites disclose their data collection and usage processes in GA4 to users and provide an opt-out option.
Existing Limitations of GA4 with AMP
GA4 still experiences some limitations concerning AMP. Currently, GA4 does not support consent mode settings, dynamic configuration, e-commerce events, or additional enhancements available in standard Google Analytics. However, Google has stated that more AMP capabilities will be incorporated over time.
Introduction of Google AMP Client ID API & Cache Analysis
Google has introduced the AMP Client ID API, designed to enhance user tracking across AMP pages. Before this, interaction with your content through different contexts, like your website and Google viewers, would register as two distinct users in your analytics. The AMP Client ID API allows the association of a consistent identifier across these contexts, providing a comprehensive view of user engagement with your AMP content.
Next Steps: Configuring Analytics for AMP Pages
You can set up Analytics to monitor user interactions with your AMP pages on both Google’s cache and your website. To do so, execute these steps:
- Add the following code to the Analytics tag on your AMP pages: vars: {‘ampHost’: ‘${ampdocHost}’}.
- Set up a custom parameter named “almost” in your Google Relaunch your AMP pages for the changes to take effect.
Once completed, GA4 will track the source of each AMP pageview β either your domain or the Google AMP cache. This data will be sent to your reports under the “almost” custom parameter, offering visibility into user engagement across the various contexts where your AMP content is served.
For more detailed information on GA4 and AMP, refer to Google’s official help document.
See also: Google Recommendations: Multiple Date Signals On Webpages.
For SEO audits, CLICK HERE to book your appointment.
What’s Your SEO Score?
Enter the URL of any landing page or blog article and see how optimized it is for one keyword or phrase.