Skip to content

Commit

Permalink
Actually load Google Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
allejo committed Dec 21, 2016
1 parent 1629562 commit 85f597e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 5 additions & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,8 @@
<script>
trianglify("{{ site.ui.header.color1 }}", "{{ site.ui.header.color2 }}");
</script>
{% endif %}
{% endif %}

{% if site.analytics.google %}
{% include google-analytics.html %}
{% endif %}
2 changes: 1 addition & 1 deletion _includes/google-analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
(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','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('create', '{{ site.analytics.google }}', 'auto');
ga('send', 'pageview');
</script>
3 changes: 1 addition & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ social:
profileUrl:

analytics:
account:
domain:
google: UA-123456-1

# Build settings
markdown: kramdown
Expand Down

0 comments on commit 85f597e

Please sign in to comment.