Files
PyRIGS/templates/analytics.html
Tom Price 3230b03606 Minor improvement to tracking code.
Updated the userid tracking to better match the documentation

Added linkid tracking to analytics.html
2015-03-13 15:43:08 +00:00

19 lines
675 B
HTML

<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', 'UA-43285686-12', 'auto');
{% if user.is_authenticated %}
ga('set', '&uid', {{ user.pk }});
{% endif %}
ga('require', 'linkid', 'linkid.js');
ga('send', 'pageview');
</script>