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. */
<!-- Global site tag (gtag.js) - Google Analytics -->
+
mw.loader.load( "https://www.googletagmanager.com/gtag/js?id=UA-147071460-1" );
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-147071460-1"></script>
 
 
<script>
 
<script>
 
   window.dataLayer = window.dataLayer || [];
 
   window.dataLayer = window.dataLayer || [];

Revision as of 16:08, 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" );
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-147071460-1');
</script>