HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/web/matomo.vdk/plugins/TagManager/Template/Tag/GoogleTagTag.web.js
(function () {
  return function (parameters, TagManager) {
    this.fire = function () {

      var googleTagId = parameters.get("googleTagId");

      var gtmScript = document.createElement("script");
      gtmScript.src = `https://www.googletagmanager.com/gtag/js?id=${googleTagId}`;
      gtmScript.async = true;

      var gaScript = document.createElement('script');
      gaScript.textContent = `
              window.dataLayer = window.dataLayer || [];
              function gtag(){dataLayer.push(arguments);}
              gtag('js', new Date());
              gtag('config', '${googleTagId}');
            `;

      document.head.appendChild(gtmScript);
      document.head.appendChild(gaScript);

    };
  };
})();