src/hdalab/templates/google_analytics/analytics_template.html
author ymh <ymh.work@gmail.com>
Wed, 30 Jul 2014 14:57:51 +0200
changeset 306 e091c7ea3f90
parent 266 825ff4d6a8ac
child 627 3fd558fa38b1
permissions -rw-r--r--
readd django_wsgi and correct ref of hdalab in hdabo, again
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
170
cb3e869ab252 Add google analytics
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<script type="text/javascript">
cb3e869ab252 Add google analytics
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
var _gaq = _gaq || [];
cb3e869ab252 Add google analytics
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
_gaq.push(['_setAccount', '{{ analytics_code }}']);
cb3e869ab252 Add google analytics
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
_gaq.push(['_trackPageview']);
cb3e869ab252 Add google analytics
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
(function() {
cb3e869ab252 Add google analytics
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
cb3e869ab252 Add google analytics
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
cb3e869ab252 Add google analytics
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
cb3e869ab252 Add google analytics
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
})();
cb3e869ab252 Add google analytics
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
</script>