Skip to content

Commit 83fd9cd

Browse files
Added support for Google Analytics
Since GitHub does not even collect simple statistics, this is the best option we have.
1 parent c22dd69 commit 83fd9cd

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ enableGitInfo = true
66

77
[params]
88
description = "Website of the AIDOS Lab, an international lab of researchers interested in geometry, topology, and machine learning."
9+
googleTagID = "G-Z7H79RP4BR"
910

1011
ignoreFiles = ['publications.md$']
1112

themes/brevis/layouts/partials/head.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,16 @@
2323
<link rel="preload" as="style" href="{{ relURL "css/style.css" }}">
2424
<link rel="stylesheet" href="{{ relURL "css/style.css" }}">
2525

26+
{{ with .Site.Params.googleTagID }}
27+
<!-- Google tag (gtag.js) -->
28+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
29+
<script>
30+
window.dataLayer = window.dataLayer || [];
31+
function gtag(){dataLayer.push(arguments);}
32+
gtag('js', new Date());
33+
34+
gtag('config', '{{ . }}');
35+
</script>
36+
{{ end }}
37+
2638
</head>

0 commit comments

Comments
 (0)