mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added fix for ga not being present on localhost
This commit is contained in:
@@ -34,13 +34,17 @@
|
||||
<link rel="icon" id="favicon" type="image/png" sizes="16x16" href="/assets/images/favicon-16x16.png">
|
||||
<link rel="mask-icon" href="/assets/images/safari-pinned-tab.svg" color="#2d2d2d">
|
||||
<script type="text/javascript">
|
||||
if(window.location.hostname.indexOf("zoff.me") >= 0) {
|
||||
if(window.location.hostname != "localhost") {
|
||||
(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', '{{{ analytics }}}', 'auto');
|
||||
} else {
|
||||
function ga() {
|
||||
console.log(arguments);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user