Google Analytics 4 (GA4) now offers support for Accelerated Mobile Pages (AMP), according to an announcement made by Google Ads Liaison Ginny Marvin. This update allows all websites utilizing GA4 to incorporate AMP and benefit from its capabilities.
To enable AMP analytics in GA4, website publishers simply need to make a minor update to their amp-analytics configuration. Once implemented, analytics data will start flowing immediately into GA4.
Streamlined Integration: GA4 and AMP Work Hand in Hand
While AMP pages function similarly to HTML and are compatible with any browser, they do not support the gtag.js used in Google Analytics. Instead, AMP utilizes a separate tag specifically designed for AMP.
Furthermore, user identification for AMP differs from other formats. In GA4, GA4 randomly generates user identifiers and stores them in local storage or cookies. When users clear their cookies and local storage, GA4 resets these identifiers. Consequently, IP masking is unnecessary since Google Analytics 4 does not log or store IP addresses.
Unlock Valuable Insights with AMP Analytics Tag
To collect data effectively, websites must implement the AMP Analytics tag. This tag collects various types of data, including page data, user data, browsing data, browser data, interaction data, and event data.
Google mandates websites to disclose data collection and usage in GA4, with an opt-out option for users.
It’s important to note that GA4 does have some limitations concerning AMP integration. Google Analytics 4 does not currently support consent mode settings, dynamic configuration, ecommerce events, or additional enhancements available in standard Google Analytics. However, Google has indicated its intention to gradually introduce more AMP capabilities to Google Analytics 4 in the future.
Seamless User Tracking
Additionally, Google recently introduced the AMP Client ID API, which enables improved user tracking across AMP pages. Previously, if a user engaged with content through a website and Google viewers like the Google AMP viewer or Google Search, they would appear as separate users in analytics due to different contexts. With the AMP Client ID API, it’s now possible to associate a consistent ID with a single user in these contexts, offering a complete view of AMP content interactions regardless of where it’s served.
To track user interactions with AMP pages on Google’s cache versus the website, Analytics can be configured accordingly. This involves adding specific code to the Analytics tag on AMP pages, setting up a custom parameter named “ampHost” in Google Analytics 4, and relaunching the AMP pages for the changes to take effect.
GA4 will then track the source of each AMP pageview, whether from the website’s domain or the Google AMP cache, providing this information in the reports under the “ampHost” custom parameter. This visibility enables better understanding of user engagement across various contexts.
Google’s Commitment to a Seamless GA4 Migration
Overall, the integration of AMP support in GA4 aligns it with Universal Analytics (UA), facilitating a smooth transition for publishers when UA is permanently retired. This integration is crucial for publishers who rely on AMP to track their metrics within Google Analytics 4.
With the deadline for the GA4 migration approaching, Google continues to introduce updates to the platform, ensuring a seamless transition for publishers.
For further information about the integration of GA4 and AMP, see Google’s official Documentation.