Skip to content

Commit

Permalink
Merge pull request #565 from p2pu/google-tag
Browse files Browse the repository at this point in the history
Update analytics.js to google tag code
  • Loading branch information
dirkcuys authored Jul 3, 2023
2 parents 806339c + 8f78411 commit b3f2dcd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
14 changes: 7 additions & 7 deletions _includes/ga.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-CYVGJM4W8L"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-5757664-25', 'auto');
ga('send', 'pageview');
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-CYVGJM4W8L');
</script>

2 changes: 2 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

{% include ga.html %}

</head>
1 change: 0 additions & 1 deletion _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

{% include footer.html %}
{% include scripts.html %}
{% include ga.html %}

</body>
</html>
3 changes: 3 additions & 0 deletions en/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

{% include ga.html %}

</head>

<body id="home">
Expand Down

0 comments on commit b3f2dcd

Please sign in to comment.