Skip to content

Commit

Permalink
update Google Analytics script
Browse files Browse the repository at this point in the history
  • Loading branch information
Hua-Zhou committed Dec 26, 2023
1 parent 70b6f5b commit c0cabbc
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 22 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
theme: jekyll-theme-minimal
title: Hua Zhou Homepage
google_analytics: G-KVD5Y9ZGRB
google_analytics: UA-42646483-1
url: http://hua-zhou.github.io
18 changes: 10 additions & 8 deletions _layouts/course.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
<![endif]-->

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

gtag('config', 'G-KVD5Y9ZGRB');
</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-42646483-1', 'hua-zhou.github.io');
ga('send', 'pageview');

</script>

</head>

Expand Down
17 changes: 10 additions & 7 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
<![endif]-->

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-KVD5Y9ZGRB"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
<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-42646483-1', 'hua-zhou.github.io');
ga('send', 'pageview');

</script>

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

<body>
Expand Down
14 changes: 8 additions & 6 deletions _layouts/post_teaching.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
<![endif]-->

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

gtag('config', 'G-KVD5Y9ZGRB');
(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-42646483-1', 'hua-zhou.github.io');
ga('send', 'pageview');

</script>

<script type="text/x-mathjax-config">
Expand Down

0 comments on commit c0cabbc

Please sign in to comment.