MediaWiki:Mobile.js: Difference between revisions
Jump to navigation
Jump to search
(Created page with "→Any JavaScript here will be loaded for users using the mobile site: <!-- Global Site Tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
(function () | |||
{ | |||
var script = document.createElement('script'); | |||
script.src = 'https://www.googletagmanager.com/gtag/js?id=UA-45171210-1'; | |||
script.async = true; | |||
document.getElementsByTagName('head')[0].appendChild(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-45171210-1'); | gtag('config', 'UA-45171210-1'); | ||
} | |||
) (); |
Latest revision as of 08:55, 30 September 2017
(function () { var script = document.createElement('script'); script.src = 'https://www.googletagmanager.com/gtag/js?id=UA-45171210-1'; script.async = true; document.getElementsByTagName('head')[0].appendChild(script); window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date()); gtag('config', 'UA-45171210-1'); } ) ();