jekyll-theme-yat
jekyll-theme-yat copied to clipboard
Google Analytics 4 Tag - Data not received
Hi there,
I'm having some issue switching from GA to GA4, as the tag changes from UA-xxxxx to G-xxxxx. I simply tried to change my _config.yml but with no success.
Any idea on how to fix the tracking?
Perhaps the google-analytics.html should be updated following what has been done in the minima example? It looks like they switched from https://www.google-analytics.com/analytics.js to https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}
Thank you!
As a test, I tried to update my google-analytics.html following the minima example I linked before and now it works.
However I don't know if my solution is reliable or not since I was not the author in the first place 😄
One way to achieve that without overriding the HTML file locally, is to actually switch to the latest version of the minima bundle, using remote_theme: jekyll/minima instead of theme: minima in your _config.yml
I used that while also trying to update to GA4 and Dark mode: https://stackoverflow.com/a/70721593/1163698
Hi @jacoporepossi,
I just update to support GA4, please see #112. Thanks for supporting YAT theme.
Thanks & Regards