google_analytics.html 430 B

1234567891011
  1. {% if site.google_analytics.mytrackingcode %}
  2. <!-- Global site tag (gtag.js) - Google Analytics -->
  3. <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics.mytrackingcode }}"></script>
  4. <script>
  5. window.dataLayer = window.dataLayer || [];
  6. function gtag(){dataLayer.push(arguments);}
  7. gtag('js', new Date());
  8. gtag('config', '{{ site.google_analytics.mytrackingcode }}');
  9. </script>
  10. {% endif %}