Below you will find pages that utilize the taxonomy term “analytics”
March 25, 2022
Google Analytics Hugo Theme
Google Analytics in my Hugo website I initially was using the following code to track my google analytics however it wasn’t working: <script type="application/javascript"> var doNotTrack = false; if (!doNotTrack) { window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; ga('create', 'G-3VXD2H9YHW', 'auto'); ga('send', 'pageview'); } </script> <script async="" src="https://www.google-analytics.com/analytics.js"></script>
I’m using a Hugo theme which happens to be using a Hugo internal template. I basically entered my tag manager measurement id into the yml config file and it constructed the javascript above.