mirror of https://github.com/freeCodeCamp/devdocs
parent
2eb865442c
commit
66a0b82e3c
@ -1,28 +1,32 @@
|
|||||||
try {
|
try {
|
||||||
if (app.config.env == 'production') {
|
if (app.config.env === 'development') {
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
if (Cookies.get('analyticsConsent') === '1') {
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
ga('create', 'UA-5544833-12', 'devdocs.io');
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||||
page.track(function() {
|
ga('create', 'UA-5544833-12', 'devdocs.io');
|
||||||
ga('send', 'pageview', {
|
page.track(function() {
|
||||||
page: location.pathname + location.search + location.hash,
|
ga('send', 'pageview', {
|
||||||
dimension1: app.router.context && app.router.context.doc && app.router.context.doc.slug_without_version
|
page: location.pathname + location.search + location.hash,
|
||||||
|
dimension1: app.router.context && app.router.context.doc && app.router.context.doc.slug_without_version
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
page.track(function() {
|
page.track(function() {
|
||||||
if (window._gauges)
|
if (window._gauges)
|
||||||
_gauges.push(['track']);
|
_gauges.push(['track']);
|
||||||
else
|
else
|
||||||
(function() {
|
(function() {
|
||||||
var _gauges=_gauges||[];!function(){var a=document.createElement("script");
|
var _gauges=_gauges||[];!function(){var a=document.createElement("script");
|
||||||
a.type="text/javascript",a.async=!0,a.id="gauges-tracker",
|
a.type="text/javascript",a.async=!0,a.id="gauges-tracker",
|
||||||
a.setAttribute("data-site-id","51c15f82613f5d7819000067"),
|
a.setAttribute("data-site-id","51c15f82613f5d7819000067"),
|
||||||
a.src="https://secure.gaug.es/track.js";var b=document.getElementsByTagName("script")[0];
|
a.src="https://secure.gaug.es/track.js";var b=document.getElementsByTagName("script")[0];
|
||||||
b.parentNode.insertBefore(a,b)}();
|
b.parentNode.insertBefore(a,b)}();
|
||||||
})();
|
})();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
resetAnalytics();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch(e) { }
|
} catch(e) { }
|
||||||
|
Loading…
Reference in new issue