Difference between revisions of "MediaWiki:Common.js"
From NSV13
Jump to navigationJump to searchimported>MrStonedOne (Created page with "→Any JavaScript here will be loaded for all users on every page load.: var _paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called befo...") |
|||
Line 2: | Line 2: | ||
var _paq = window._paq || []; | var _paq = window._paq || []; | ||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ | /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ | ||
− | |||
− | |||
− | |||
_paq.push(['trackPageView']); | _paq.push(['trackPageView']); | ||
_paq.push(['enableLinkTracking']); | _paq.push(['enableLinkTracking']); | ||
(function() { | (function() { | ||
− | var u="// | + | var u="//nsv.beestation13.com/matomo/"; |
− | _paq.push(['setTrackerUrl', u+' | + | _paq.push(['setTrackerUrl', u+'matomo.php']); |
_paq.push(['setSiteId', '1']); | _paq.push(['setSiteId', '1']); | ||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; | 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+' | + | g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); |
})(); | })(); |
Latest revision as of 17:33, 3 July 2020
/* Any JavaScript here will be loaded for all users on every page load. */
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//nsv.beestation13.com/matomo/";
_paq.push(['setTrackerUrl', u+'matomo.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+'matomo.js'; s.parentNode.insertBefore(g,s);
})();