Skip to content

Commit

Permalink
Merge branch 'MarkLodato-analytics' into v110
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Apr 3, 2020
2 parents f7fec9a + 0a4b184 commit a56b42b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ plugins:

# Custom vars
version: 1.1.0
google_analytics_id: #UA-XXXX-Y
11 changes: 11 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,15 @@
<link rel="shortcut icon" href="{{ '/public/favicon.ico' | absolute_url }}">

<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ '/atom.xml' | absolute_url }}">

{% if site.google_analytics_id %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics_id }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
</head>

0 comments on commit a56b42b

Please sign in to comment.