Google Analytics 4 Support for AMP pages

Google Analytics 4 Support for AMP pages

Analytics, Google AMP
After going through a lot of blog posts and discussions on the internet. I found a working solution with a magic code snippet. As you know the new Google Analytics 4 (GA4) will be the only analytics processing the data and working from July 1, 2023. Read more here. Also read: GA4 Setup for non-technical The universal analytics is shutting down processing of the data. Also we can not migrate the data from Universal Analytics (GA3) to GA4, that's sad. Whilst we have these problems, many sites which are using AMP and put a lot of efforts and time on building AMP pages, did not have direct solutions to get GA4 working on AMP pages. No solution on topics here also. Google Analytics 4 + Google AMP There are two…
Read More