Skip to content

Commit 026e0f0

Browse files
committed
Enable website traffic analysis using Google Analytics
1 parent cf725bf commit 026e0f0

File tree

6 files changed

+45
-3
lines changed

6 files changed

+45
-3
lines changed

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ header_pages:
1212
collections:
1313
team:
1414
output: true
15+
google_analytics: G-JFZW6XXB7T

form_generator/Checklist.html

+8-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,14 @@
6868
});
6969
});
7070
</script>
71-
71+
<!-- Google tag (gtag.js) -->
72+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
73+
<script>
74+
window.dataLayer = window.dataLayer || [];
75+
function gtag(){dataLayer.push(arguments);}
76+
gtag('js', new Date());
77+
gtag('config', '{{ site.google_analytics }}');
78+
</script>
7279
</head>
7380
<body onload="showInstructions();">
7481
<div id="container">

form_generator/index.html

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
21
<html>
32
<head>
43
<title>Empirical Standards</title>
54
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
65
<meta name="viewport" content="width=device-width, initial-scale=1">
76
<link rel="stylesheet" href="../form_generator/css/appearance.css">
8-
<link rel="stylesheet" href="../form_generator/css/tooltip.css">
7+
<link rel="stylesheet" href="../form_generator/css/tooltip.css">
8+
9+
<!-- Google tag (gtag.js) -->
10+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
11+
<script>
12+
window.dataLayer = window.dataLayer || [];
13+
function gtag(){dataLayer.push(arguments);}
14+
gtag('js', new Date());
15+
gtag('config', '{{ site.google_analytics }}');
16+
</script>
917
</head>
1018
<body>
1119
<div id="container">

form_generator/result.html

+9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
<meta name="viewport" content="width=device-width, initial-scale=1">
1111
<link rel="stylesheet" href="../form_generator/css/appearance.css">
1212
<link rel="stylesheet" href="../form_generator/css/tooltip.css">
13+
14+
<!-- Google tag (gtag.js) -->
15+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
16+
<script>
17+
window.dataLayer = window.dataLayer || [];
18+
function gtag(){dataLayer.push(arguments);}
19+
gtag('js', new Date());
20+
gtag('config', '{{ site.google_analytics }}');
21+
</script>
1322
</head>
1423
<body onload="generateStandardChecklist()"></body>
1524
</html>

tab_03_standards.md

+9
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ function openStandardFromURL(evt) {
5757
document.getElementById(standardName+'_b').className += " active";
5858
}
5959
</script>
60+
61+
<!-- Google tag (gtag.js) -->
62+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
63+
<script>
64+
window.dataLayer = window.dataLayer || [];
65+
function gtag(){dataLayer.push(arguments);}
66+
gtag('js', new Date());
67+
gtag('config', '{{ site.google_analytics }}');
68+
</script>
6069
</head>
6170
<body onload="openStandardFromURL(event)">
6271

tab_04_supplements.md

+8
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ function openSupplementFromURL(evt) {
5757
document.getElementById(supplementName+'_b').className += " active";
5858
}
5959
</script>
60+
<!-- Google tag (gtag.js) -->
61+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
62+
<script>
63+
window.dataLayer = window.dataLayer || [];
64+
function gtag(){dataLayer.push(arguments);}
65+
gtag('js', new Date());
66+
gtag('config', '{{ site.google_analytics }}');
67+
</script>
6068
</head>
6169
<body onload="openSupplementFromURL(event)">
6270

0 commit comments

Comments
 (0)