Difference between revisions of "MediaWiki:Common.js"

From CowleyRoad.org
Jump to navigation Jump to search
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: <!-- Piwik --> <script type="text/javascript"> var _paq = _paq || []; /* tracker methods like "...")
 
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
<!-- Piwik -->
 
<script type="text/javascript">
 
 
   var _paq = _paq || [];
 
   var _paq = _paq || [];
 
   /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
 
   /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
Line 15: Line 12:
 
     g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
 
     g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
 
   })();
 
   })();
</script>
 
<!-- End Piwik Code -->
 

Revision as of 18:58, 6 May 2017

/* Any JavaScript here will be loaded for all users on every page load. */
  var _paq = _paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(["setCookieDomain", "*.cowleyroad.org"]);
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//piwik.charlieharvey.org.uk/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', '10']);
    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);
  })();