Skip to content

Commit

Permalink
Merge pull request #74 from ImperialCollegeLondon/fathom
Browse files Browse the repository at this point in the history
πŸ› preventing the analystics script from running in devlopment
  • Loading branch information
Sahil590 authored Oct 31, 2024
2 parents 87137be + 07b1ab2 commit c4dc92a
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions docs/overrides/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t; o.id='fathom-script';
m.parentNode.insertBefore(o,m)
})(document, window, '//ic-rcs-fathom.uksouth.cloudapp.azure.com/tracker.js', 'fathom');
fathom('set', 'siteId', 'NEHMU');
fathom('trackPageview');
if (window.location.hostname !== '127.0.0.1' && window.location.hostname !== 'localhost')
{ (function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t; o.id='fathom-script';
m.parentNode.insertBefore(o,m)
})(document, window, '//ic-rcs-fathom.uksouth.cloudapp.azure.com/tracker.js', 'fathom');
fathom('set', 'siteId', 'NEHMU');
fathom('trackPageview');
}
else {
console.log('Fathom is disabled on localhost');
}
</script>
<!-- / Fathom -->

0 comments on commit c4dc92a

Please sign in to comment.