Difference between revisions of "MediaWiki:Common.js"

From BSC Policy
Jump to navigationJump to search
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. */
 
mw.loader.load( "https://www.googletagmanager.com/gtag/js?id=UA-147071460-1" );
 
mw.loader.load( "https://www.googletagmanager.com/gtag/js?id=UA-147071460-1" );
<script>
+
window.dataLayer = window.dataLayer || [];
  window.dataLayer = window.dataLayer || [];
+
function gtag(){dataLayer.push(arguments);}
  function gtag(){dataLayer.push(arguments);}
+
gtag('js', new Date());
  gtag('js', new Date());
+
gtag('config', 'UA-147071460-1');
 
 
  gtag('config', 'UA-147071460-1');
 
</script>
 

Revision as of 16:09, 3 September 2019

/* Any JavaScript here will be loaded for all users on every page load. */
mw.loader.load( "https://www.googletagmanager.com/gtag/js?id=UA-147071460-1" );
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-147071460-1');