Closed Jarmos-san closed 3 years ago
I noticed Google Analytics takes some time to reflect the data. can you confirm if this is working for you now?
@santosh I scraped the project after tinkering around with for a while. So apologies but I can't confirm it for you anymore.
If necessary I can close the issue right away though.
For me, the analytics work fine.
In this case, closing the issue would be good in my opinion, what do you say @Track3?
Alright, great! I personally prefer closing down stale issues. If someone else faces the same they can reopen the issue as required.
Google analytics has not been receiving any traffic from my Hugo/Hermit site recently. I guess this happened after I update hermit git submodule in my site repo.
Google analytics has not been receiving any traffic from my Hugo/Hermit site recently. I guess this happened after I update hermit git submodule in my site repo.
If it's still prevalent, I'm willing to reopen the issue.
@Jarmos-san yes please. can you reopen this again? I have checked my GA tracking id, Hermit analytics.html
partial and baseof.html
and they look fine to me. Yet, in my compiled static site, I can't find a reference to Google Analytics.
@Jarmos-san I am very confident the reason for this misbehavior is that you use a google analytics v4 ID: https://gohugo.io/templates/internal/#use-the-google-analytics-template
If so, hermit includes the wrong template. We have to use:
{{ template "_internal/google_analytics.html" . }}
EDIT: Okay, you also have to disable the privacy configuration in the config.toml file. On default all of them are disabled for GDPR compliance:
# Disable all services for GDPR compliance
[privacy]
[privacy.disqus]
disable = true
[privacy.googleAnalytics]
disable = true
[privacy.instagram]
disable = true
[privacy.twitter]
disable = true
[privacy.vimeo]
disable = true
[privacy.youtube]
disable = true
Note: If you live in Europe I would suggest to keep it disabled, because hugo nor hermit seem to support a "cookie dialog" for asking the user for permission... sigh..
@shibumi thanks for the heads up! Yeah I figured out the issue quite some time ago & forgot to respond back to this issue. So, I think your suggestions are pretty valid & I can close this issue.
Cheers & thanks!
As specified in the documentation I updated the
config
variable with my Google Analytics Tracking ID, yet it doesn't seem to be tracking any traffic.As an added precaution I even added an
analytics.html
file in the rootlayout/partials
folder. Nothing seems to work.So where am I going wrong?