Google Analytics 4 now supports Accelerated Mobile Pages (AMP)

Today, Ginny Marvin, the Google Ads link announced that Accelerated Mobile Pages (AMP) support is now available for all Google Analytics 4 (GA4) websites.

Marvin said,

“Today, we’re rolling out support for AMP in GA4 to all publishers. A simple update to the amp-analytics configuration will allow analytics to start flowing immediately in GA4.”

AMP and GA4 integration details

Although AMP pages are HTML-like and work in any browser, they do not support the gtag.js used in Google Analytics. Instead, a separate tag is explicitly provided for AMP.

The user ID for AMP is also different. In GA4, user IDs are randomly generated and stored in cookies or local storage.

The user ID is reset when the user clears cookies and local storage. This means that IP masking is not necessary as IP addresses are not logged or stored in GA4.

requirements

To collect data, you must implement the AMP Analytics tag. AMP Analytics collects page data, user data, navigation data, browser data, interaction data, and event data.

In addition, Google requires all websites to disclose to users how data is collected and used in GA4 and provide an option to opt out.

limitations

GA4 has some limitations when it comes to AMP. It does not support consent mode settings, dynamic settings, e-commerce events, or additional enhancements available in standard Google Analytics.

More AMP capabilities will be added over time, according to Google.

Google AMP Client ID API and cache parsing

It’s worth noting that Google recently introduced the AMP Client ID API to better track users on AMP pages.

Until now, if a user interacted with your content both on your website and through Google viewers, such as the Google AMP viewer or Google Search, they appeared as two separate users in your analytics because the content was published in two different contexts.

The AMP Client ID API allows you to associate a consistent ID with a single user in these contexts to get a complete view of their engagement with your AMP content, regardless of where it is served.

next steps

You can set up Analytics to track how users interact with your AMP pages in Google’s cache compared to your website.

To do this, follow these steps:

Add the following code to the Analytics tag of your AMP pages: vars: { ‘ampHost’: ‘${ampdocHost}’ } In your Google Analytics 4 property, set a custom parameter called “ampHost” to tracking where the AMP page is served. Restart your AMP pages for the changes to take effect.

Once you’ve completed these steps, GA4 will track whether each viewed AMP page comes from your domain or from Google’s AMP cache and will send this information to your reports with the “ampHost” custom parameter.

This can provide visibility into user engagement in the contexts in which your AMP content is served.

For more information about GA4 and AMP, see the Google official help document.

Featured Image: Postmodern Studio/Shutterstock



[ad_2]

Source link

You May Also Like

About the Author: Ted Simmons

I follow and report the current news trends on Google news.

Leave a Reply

Your email address will not be published. Required fields are marked *