google analytics

This commit is contained in:
Micah Cowell 2016-03-26 23:05:47 -07:00
parent 132925cc29
commit a0d0712e1c
2 changed files with 7 additions and 13 deletions

View File

@ -1,6 +1,6 @@
# My variables
name: Micah Cowell
google_analytics: null
google_analytics: UA-39119359-12
google_verification: null

View File

@ -24,18 +24,12 @@
{% if jekyll.environment == 'production' and site.google_verification%}
<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 }}', 'auto');
(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_verification }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}