minimal-mistakes icon indicating copy to clipboard operation
minimal-mistakes copied to clipboard

Google analytics update

Open lskatz opened this issue 1 year ago • 1 comments

What happened?

  • Minimal Mistakes version: master branch
  • Ruby gem or remote theme version:
  • Jekyll version:
  • Git repository URL:
  • Hosted on GitHub Pages (if yes provide URL to site):
  • Operating system:

I believe that Google Analytics updated their javascript to the following

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

  gtag('config', '{{ site.analytics.google.tracking_id }}');
</script>

Expected behavior

analytics aren't working

Steps to reproduce the behavior

use analytics; check at https://analytics.google.com

Other

No response

lskatz avatar Oct 19 '23 16:10 lskatz

And I suggest just updating google.html to the above code. I have not personally tested it yet; I need to get my own Google Analytics account set up.

lskatz avatar Oct 19 '23 16:10 lskatz

You should be looking at google-gtag.html.

iBug avatar Apr 23 '24 05:04 iBug