In the present day, Google Adverts Liaison Ginny Marvin introduced that Accelerated Cellular Pages (AMP) assist is now accessible for all web sites in Google Analytics 4 (GA4).
Marvin acknowledged,
“In the present day, we’re rolling out assist for AMP in GA4 to all publishers. A easy replace to your amp-analytics configuration will allow analytics to begin flowing instantly into GA4.”
AMP & GA4 Integration Particulars
Whereas AMP pages are much like HTML and work in any browser, they don’t assist the gtag.js utilized in Google Analytics. As a substitute, a separate tag is explicitly supplied for AMP.
Consumer identification for AMP is totally different as nicely. In GA4, consumer identifiers are randomly generated and saved in native storage or cookies.
The consumer identifier is reset when the consumer clears cookies and native storage. Meaning IP masking is pointless, as IP addresses aren’t logged or saved in GA4.
Necessities
To gather information, you will need to implement the AMP Analytics tag. AMP Analytics collects web page information, consumer information, shopping information, browser information, interplay information, and occasion information.
Moreover, Google requires all web sites to open up to customers how information is collected and utilized in GA4 and supply an choice to choose out.
Limitations
GA4 has some limitations concerning AMP. It doesn’t assist consent mode settings, dynamic configuration, ecommerce occasions, or further enhancements accessible in normal Google Analytics.
Extra AMP capabilities shall be added over time, in response to Google.
Google AMP Shopper ID API & Cache Evaluation
It’s price noting that Google just lately launched the AMP Shopper ID API to trace customers throughout AMP pages higher.
Till now, if a consumer interacted together with your content material on each your web site and thru Google viewers just like the Google AMP viewer or Google Search, they would seem as two separate customers in your analytics because the content material was being served in two totally different contexts.
The AMP Shopper ID API permits you to affiliate a constant identifier with a single consumer throughout these contexts to realize a whole view of their engagement together with your AMP content material no matter the place it’s served.
Subsequent Steps
You may configure Analytics to trace how customers work together together with your AMP pages on Google’s cache versus your web site.
To take action, observe these steps:
- Add the next code to the Analytics tag in your AMP pages:
vars: {
'ampHost': '${ampdocHost}'
}
- In your Google Analytics 4 property, arrange a customized parameter named “ampHost” to trace the place the AMP web page is served.
- Relaunch your AMP pages for the adjustments to take impact.
When you’ve accomplished these steps, GA4 will monitor whether or not every AMP pageview got here out of your area or the Google AMP cache and ship that data to your studies below the “ampHost” customized parameter.
This could present visibility into consumer engagement throughout the contexts during which your AMP content material is served.
For extra on GA4 & AMP, see Google’s official assist doc.
Featured Picture: Postmodern Studio/Shutterstock