MediaWiki:Common.js

From ICE List Wiki
Revision as of 10:56, 12 December 2025 by ICEListAdmin6 (talk | contribs)
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Google Analytics 4 (GA4) */
(function() {
    // load gtag.js
    var gtagScript = document.createElement('script');
    gtagScript.async = true;
    gtagScript.src = "https://www.googletagmanager.com/gtag/js?id=G-J74YLZ84K3";
    document.head.appendChild(gtagScript);

    // gtag config
    window.dataLayer = window.dataLayer || [];
    function gtag(){ dataLayer.push(arguments); }
    window.gtag = gtag;

    gtag('js', new Date());
    gtag('config', 'G-J74YLZ84K3', {
        anonymize_ip: true
    });
})();
if (mw.config.get('wgUserGroups').includes('sysop')) return;