Skip to content

Commit

Permalink
barryclark#13 Bug Fix about google analytics not work
Browse files Browse the repository at this point in the history
  • Loading branch information
DONGChuan authored Jul 27, 2016
1 parent 4001a2d commit 7f430b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<script src="/assets/js/{{javascript}}"></script>
{% endfor %}

{% if site.analytics.google.tracking_id %}
<!-- Google Analytics -->
<div style="display:none">
<script>
Expand All @@ -36,10 +37,11 @@
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', 'UA-72165600-1', 'auto');
ga('create', '{{ site.analytics.google.tracking_id }}', 'auto');
ga('send', 'pageview');

</script>
</div>
{% endif %}

</footer>

0 comments on commit 7f430b6

Please sign in to comment.