Skip to content

Commit 8244e54

Browse files
committed
add Google Analytics
1 parent f9ffae7 commit 8244e54

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

static/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Google Analytics
2+
window.dataLayer = window.dataLayer || [];
3+
function gtag(){dataLayer.push(arguments);}
4+
gtag('js', new Date());
5+
6+
gtag('config', 'G-36KQSD0BWH');

templates/layout.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828

2929
</head>
3030

31+
<!-- Google Analytics -->
32+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-36KQSD0BWH"></script>
33+
3134
<body>
3235

3336
<nav class="navbar navbar-expand-md navbar-light bg-light border">
@@ -78,4 +81,6 @@
7881

7982
</body>
8083

84+
<script type="text/javascript" src="/static/index.js"></script>
85+
8186
</html>

0 commit comments

Comments
 (0)