Fix GA tracking
This commit is contained in:
parent
223792cda9
commit
a36257a7c7
1 changed files with 1 additions and 10 deletions
|
@ -10,18 +10,9 @@
|
||||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var linkerOptions = {{ site.google_analytics_linker | jsonify }};
|
|
||||||
var host = window.location.host;
|
var host = window.location.host;
|
||||||
|
|
||||||
if (linkerOptions !== null) {
|
|
||||||
ga('create', '{{ site.google_analytics }}', host, 'auto', {
|
|
||||||
'allowLinker': true
|
|
||||||
});
|
|
||||||
ga('require', 'linker');
|
|
||||||
ga('linker:autoLink', linkerOptions[host]);
|
|
||||||
} else {
|
|
||||||
ga('create', '{{ site.google_analytics }}', host);
|
ga('create', '{{ site.google_analytics }}', host);
|
||||||
}
|
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue