shenoydotme / hugo-goa

Simple Minimalistic Theme for Hugo
https://shenoydotme.github.io/hugo-goa-demo/
MIT License
265 stars 129 forks source link

New Google Analytics snippet #94

Closed chrish42 closed 4 years ago

chrish42 commented 4 years ago

Google has a new recommended Google Analytics snippet to replace the current one used by the theme:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=INSERT_GA_ID_HERE"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', INSERT_GA_ID_HERE);
</script>
xaner4 commented 4 years ago

The theme itself does not manage the google analytics snippets as it uses a internal template snippet generated by hugo, however there is a PR over on the Hugo repo that have added the new snippet https://github.com/gohugoio/hugo/pull/7780

chrish42 commented 4 years ago

Oh. I didn't catch this detail, apparently. And thanks for the link to the Hugo issue. We can close this bug, then. Thanks again!