-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathanalytics.html
37 lines (33 loc) · 1.28 KB
/
analytics.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{% if GOOGLE_ANALYTICS_CODE %}
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', "{{ GOOGLE_ANALYTICS_CODE }}"]);
{% if GOOGLE_ANALYTICS_DOMAIN %}_gaq.push(['_setDomainName', "{{GOOGLE_ANALYTICS_DOMAIN}}"]);{% endif %}
{% if GOOGLE_ANALYTICS_DOMAIN_UP %}_gaq.push(['_setAllowLinker', true]);{% endif %}
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
{% endif %}
{% if GOSQUARED_SITENAME %}
<script type="text/javascript">
var GoSquared = {};
GoSquared.acct = "{{ GOSQUARED_SITENAME }}";
(function(w){
function gs(){
w._gstc_lt = +new Date;
var d = document, g = d.createElement("script");
g.type = "text/javascript";
g.src = "//d1l6p2sc9645hc.cloudfront.net/tracker.js";
var s = d.getElementsByTagName("script")[0];
s.parentNode.insertBefore(g, s);
}
w.addEventListener ?
w.addEventListener("load", gs, false) :
w.attachEvent("onload", gs);
})(window);
</script>
{% endif %}