Skip to content

Commit d6046ba

Browse files
Merge pull request #46 from UpstreamCode/andrew-post-update-fixes
added Google Analytics
2 parents a75b2b6 + feac61a commit d6046ba

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ donate_url: https://give.pioneers.org/s-donate?firstname=%27Upstream%27&ProjectC
3232

3333
theme: null
3434

35+
google_analytics: G-6WMQ7FCBRJ
36+
3537
# Build settings
3638
plugins:
3739
- jekyll-feed

_includes/head.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,14 @@
1616
<meta name="msapplication-TileColor" content="#1d1d1d">
1717
<meta name="msapplication-config" content="/assets/browserconfig.xml">
1818
<meta name="theme-color" content="#ffffff">
19+
{% if site.google_analytics %}
20+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
21+
<script>
22+
window.dataLayer = window.dataLayer || [];
23+
function gtag(){dataLayer.push(arguments);}
24+
gtag('js', new Date());
25+
26+
gtag('config', '{{ site.google_analytics }}');
27+
</script>
28+
{% endif %}
1929
</head>

0 commit comments

Comments
 (0)