How to configure GA4 for AMP

Posted in: Newspaper
Post count: 75

Hi,

I need to track the AMP page views. Previously I used to place the analaytics code in AMP analytics section of theme pannel but currently it’s not working. Please let me know what code needs to be placed there for GA4

Note: I have checked the below link and there is no solution
https://forum.tagdiv.com/topic/google-analytics-4-ga4-for-amp-pages/

Regards,
Satheeshraj V

Post count: 35449

Hi,
There situation with the GA4 on amp is a little complicate https://www.seroundtable.com/google-amp-support-google-analytics-4-35114.html at the first look it seems to not work for amp, but you can do some work around and this will work – https://tech.behindmatters.com/google-analytics-4-support-for-amp-pages/ after that you can set the code in this place – https://i.imgur.com/pmJHz9M.png or in this place – https://i.imgur.com/CcNJ2cU.png
Thank you!

Post count: 22

is
{
“vars”: {
“GA4_MEASUREMENT_ID”: “G-XXXXXXXXXX”,
“GA4_ENDPOINT_HOSTNAME”: “www.google-analytics.com”,
“DEFAULT_PAGEVIEW_ENABLED”: true,
“GOOGLE_CONSENT_ENABLED”: false,
“WEBVITALS_TRACKING”: false,
“PERFORMANCE_TIMING_TRACKING”: false
}
}
enought ?

Post count: 35449

Hi vet, yes, that should be enough.
Let us know the results!
Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.