Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (28 sloc) 1.3 KB
{% if jekyll.environment != site.debug %}<script type="text/javascript" charset="utf-8" data-src="analytics">
/* <!-- Only proceed with loading the Google Analytics Script if the Browser Do-Not-Track feature is NOT enabled --> */
if (!navigator.doNotTrack) {
var __f = false;
var __a = function() {
(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','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.analytics.id }}', 'auto');
ga('send', 'pageview');
__f = true;
};
if (window.addEventListener) {
{% if page.app %}
window.addEventListener("load", __a, false);
{% elsif site.analytics.scroll %}
window.addEventListener("scroll", function() {if ((document.documentElement.scrollTop != 0 && __f === false) || (document.body.scrollTop != 0 && __f === false)) __a();}, true);
{% else %}
window.addEventListener("load", __a, false);
{% endif %}
} else if (window.attachEvent) {
window.attachEvent("onload", __a);
} else {
window.onload = __a;
}
}
</script>{% endif %}
You can’t perform that action at this time.