You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Google Analytics 4 tag not appearing in <head> #3478
I've read through #2252 and it seems the end result there was the addition of this syntax:
extra:
analytics:
provider: google
property: G-***********
However, when adding that to my mkdocs.yml and publishing, there is nothing in the <head> and Google doesn't detect the tag.
The Mkdocs guide still references google_analytics: ['UA-**********', 'site-name.org'], which must be old and the Material docs reference the same method above.
I'm having the same issue. As another option I added a gtag.js file into the extra javascripts and pointed to that in the .yml but that didn't make any difference. Currently Analytics says "Your Google tag wasn't detected on your website." Any suggestions would be great.
Activity
orlasp commentedon Feb 22, 2024
I'm having the same issue. As another option I added a gtag.js file into the extra javascripts and pointed to that in the .yml but that didn't make any difference. Currently Analytics says "Your Google tag wasn't detected on your website." Any suggestions would be great.
lovelydinosaur commentedon Apr 12, 2024
Let's close this off in favor of #3630
Including GA should be supported as a template override, not a config option.
mhcpan commentedon May 1, 2024
try this: