Skip to content

Commit 1b1f057

Browse files
committed
set up google analytics the new way
1 parent cc859df commit 1b1f057

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎_config.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ description: >- # this means to ignore newlines until "baseurl:"
2525
#baseurl: "" # the subpath of your site, e.g. /blog
2626
url: "" # the base hostname & protocol for your site, e.g. http://example.com
2727
# Build settings
28+
google_analytics: G-J900LXB0C2
2829
theme: minima
2930
plugins:
3031
- jekyll-feed

‎_includes/google-analytics.html‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Google tag (gtag.js) -->
2+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J900LXB0C2"></script>
3+
<script>
4+
window.dataLayer = window.dataLayer || [];
5+
function gtag(){dataLayer.push(arguments);}
6+
gtag('js', new Date());
7+
8+
gtag('config', 'G-J900LXB0C2');
9+
</script>

0 commit comments

Comments
 (0)