diff options
author | luxagraf <sng@luxagraf.net> | 2019-05-03 14:44:39 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2019-05-03 14:44:39 -0500 |
commit | 17c51c125898f124040b109156bdc15fa4341c2a (patch) | |
tree | c874ecbd4874d84b03fa1292f7a91cc3a3b47759 /design/templates/base.html | |
parent | 6dea2fcff795f062f467fce7ed1e18c184bd5400 (diff) |
added analytics and offline support
Diffstat (limited to 'design/templates/base.html')
-rw-r--r-- | design/templates/base.html | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/design/templates/base.html b/design/templates/base.html index 7e48bc5..20c9028 100644 --- a/design/templates/base.html +++ b/design/templates/base.html @@ -66,25 +66,23 @@ if (navigator.serviceWorker) { }); } </script> - {%comment%} -<!-- Piwik --> -<script type="text/javascript"> -var _paq = _paq || []; -_paq.push(["disableCookies"]); -_paq.push(['trackPageView']); -_paq.push(['enableLinkTracking']); -(function() { - var u="//stats.luxagraf.net/"; - _paq.push(['setTrackerUrl', u+'piwik.php']); - _paq.push(['setSiteId', 1]); - var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; - g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); -})(); +{% if debug %}{%else%} +<script> +if(/libregraf\.net/.test(window.location.hostname)){ + (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, '//stats.luxagraf.net/tracker.js', 'fathom'); + fathom('set', 'siteId', 'HHQXL'); + fathom('trackPageview'); +} </script> -<noscript><p><img src="//stats.luxagraf.net/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript> -<!-- End Piwik Code --> -{%endcomment%} - +{% endif %} </body> </html> |