pelican-alchemy/alchemy/templates/include/google_analytics.html
Alan Orth 4b1c26add1 Update Google Analytics code
Use latest tracking blurb straight from Google. Also, the new code
uses "auto" for the domain so we don't need to set that anymore.

Signed-off-by: Alan Orth <alan.orth@gmail.com>
2015-02-06 17:19:53 +03:00

12 lines
478 B
HTML

{% if 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', '{{ GOOGLE_ANALYTICS_ID }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}