Skip to content

Commit

Permalink
Upgrading Google Analytics scripts to GA4
Browse files Browse the repository at this point in the history
  • Loading branch information
andrus committed Nov 1, 2022
1 parent 02b2f4d commit ee5d107
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions themes/bootique-theme/layouts/partials/google_analytics.gohtml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{ with .Site.Params.googleAnalytics }}
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-74603008-1"></script>
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='https://www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','{{ . }}');ga('send','pageview');
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-74603008-1');
</script>
{{ end }}

0 comments on commit ee5d107

Please sign in to comment.