Merge pull request #993 from italohdc/master
[jekyll-now.git] / _includes / analytics.html
blob5f346aee620c1bd4849a29444647e781cf7e5d5b
1 {% if site.google_analytics %}
2 <!-- Google Analytics -->
3 <script>
4 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
5 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
6 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
7 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
9 ga('create', '{{ site.google_analytics }}', 'auto');
10 ga('send', 'pageview', {
11 'page': '{{ site.baseurl }}{{ page.url }}',
12 'title': '{{ page.title | replace: "'", "\\'" }}'
13 });
14 </script>
15 <!-- End Google Analytics -->
16 {% endif %}