Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Measurechat (talk | contribs) |
Measurechat (talk | contribs) |
||
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. */ | ||
− | |||
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | ||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | ||
Line 7: | Line 6: | ||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | ||
})(window,document,'script','dataLayer','GTM-N7GDS2H'); | })(window,document,'script','dataLayer','GTM-N7GDS2H'); | ||
− |
Revision as of 16:08, 24 January 2019
/* Any JavaScript here will be loaded for all users on every page load. */
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-N7GDS2H');