Skip to content

Commit

Permalink
Update Google Analytics tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
mastermatt committed Dec 3, 2020
1 parent 8c9bfae commit cd01c21
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ url: "http://mattw.co" # the base hostname & protocol for your site

# Build settings
markdown: kramdown

# Google Analytics
google_analytics: UA-17054856-1
8 changes: 8 additions & 0 deletions _includes/analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '{{ site.google_analytics }}');
</script>
9 changes: 0 additions & 9 deletions _includes/google_analytics.html

This file was deleted.

8 changes: 2 additions & 6 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<!DOCTYPE html>
<html>

<html lang="en">
{% include head.html %}

<body>

{% include header.html %}

<div class="page-content">
Expand All @@ -14,7 +11,6 @@
</div>

{% include footer.html %}
{% include google_analytics.html %}
{% include analytics.html %}
</body>

</html>

0 comments on commit cd01c21

Please sign in to comment.