GA4 does not receive pageviews when AMP page is hosted on google
-
This is more of a heads up: the .json file that ends up hosted on <site_url>/wp-content/plugins/accelerated-mobile-pages/includes/features/analytics/ga4.json may not work if the server that is hosting that file does not allow it to be retrieved from other sources.
So, if the amp page ends up being hosted on google (when the url is like https://www.google.com/amp/s/<link_to_amp_article>), it cannot retrieve that file, giving a CORS error, and all those page views do not reach GA4.
Right now, I am hosting the file on a different server, where I can setup the configuration of that file in order to be retrieved from a different origin. But I believe that most users who use this plugin and do not do that, will have trouble seeing the pageviews in GA4
- The topic ‘GA4 does not receive pageviews when AMP page is hosted on google’ is closed to new replies.