Difference between revisions of "MediaWiki:Common.js"

From Recidemia
Jump to: navigation, search
 
Line 6: Line 6:
  
 
}());
 
}());
 +
 +
<!-- Global site tag (gtag.js) - Google Analytics -->
 +
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-30695810-1"></script>
 +
<script>
 +
  window.dataLayer = window.dataLayer || [];
 +
  function gtag(){dataLayer.push(arguments);}
 +
  gtag('js', new Date());
 +
 +
  gtag('config', 'UA-30695810-1');
 +
</script>

Latest revision as of 13:16, 20 April 2018

/* Any JavaScript here will be loaded for all users on every page load. */
(function () {

  var myElement = document.getElementById('mw-hello-world');
  myElement.innerHTML = '<html>Hello World!!!</html>';

}());

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-30695810-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

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