I added the google Analytic code into zen theme by adding parameter like below:
params:
GoogleAnalytics: 3XXXXXXXXX
Now, tried to check on my Google Analytic account whether it is working properly or not. And I found under realtime reports of Google Analytic noting is showing.
If anybody implemented Google Analtics on Hugo Zen theme, can you share whether did you follow any other techniques or code to make it workable?
Another thing. anybody knows whether zen theme supports old google analytics or the new google analytics or both?
the universal analytic is like UA-123456789-1 but still its not showing the report. Do you know for zen them do i need any other configuration like adding some extra code beside adding the parameter in the config.yaml file?
If you are just implementing GA in your theme, give up with Universal Analytics and do GA4 instead. UA is set to end mid this year hence is no point to gather data through UA in 2023 anymore.
Make sure it is turned on, so this is true: {{ if site.GoogleAnalytics -}}
Then see what the internal template needs in terms of param setting: Internal Templates | Hugo (gohugo.io)
But no luck! Its not producing any data. Moreover, if i try to check the code by right clicking on the browser(chrome browser) and if I try to search the id for google analytics, its also missing there.
I am using hugo version
hugo v0.109.0+extended darwin/amd64 BuildDate=unknown
Not sure I need to update to the latest version of hugo.
hi, its a little bit confusing for me. still i am trying to tell, the approach i tried lastly to implement this:
as google analytic is the default hugo settings so if i can add it under parameter of config.toml/yaml/json file it should work. i am using yaml format and I have only one config.yaml file where I added all the settings for the hugo site
But still after building/deploying i dont see any changes. My site is very small and there is no such subfolder of configuration. just one config.yaml file.
so, not sure what steps do i need to do. may be i am new for hugo, thats why i am not understanding properly. if possible can you tell me what step i am missing ?