menu

Academic

Chat about Source Themes Academic, the page builder for Hugo 👩‍💻📝🚀

Channels
Team

google analytics on github pages

June 3, 2020 at 9:47am

google analytics on github pages

June 3, 2020 at 9:47am
Hi, I am trying to set up google analytics on my academic website hosted on github pages. I build the website setting the environment production, i commented out Google tag manager and set google analytics id in params.toml. I also set the base url to my website but still google analytics does not work. Any hint / things I might check?

June 9, 2020 at 1:44am
I had a similar issue, I think adding the google analytics ID into the config/_default/config.toml fixed this
  • reply
  • like

June 10, 2020 at 2:41pm
I tried but it did not work. Are you deploying on github pages to?
  • reply
  • like
I'm using Netlify to deploy the site, maybe that is the possible difference. I had success with the step above, and also taking information from these two sites to put it together:
hope these possibly help!
  • reply
  • like