lbry.com/view/template/layout/_analytics_head.php
Kristian Polso 9a551c0c6f Closes #597
2018-06-10 10:59:51 -04:00

12 lines
564 B
PHP

<?php if (IS_PRODUCTION): ?>
<style>.async-hide { opacity: 0 !important} </style>
<script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
})(window,document.documentElement,'async-hide','dataLayer',4000,
{'GTM-NT8579P':true});</script>
<?php else: ?>
<script>
console.log('Analytics head partial skipped because this is a non-production instance.');
</script>
<?php endif ?>