www-googletagmanager-com_gtm.js 600 B

123456789101112131415161718192021222324
  1. (function () {
  2. 'use strict';
  3. const noopfn = function () {
  4. };
  5. const w = window;
  6. w.ga = w.ga || noopfn;
  7. const dl = w.dataLayer;
  8. if (typeof dl !== 'object') { return; }
  9. if (typeof dl.hide === 'object' && typeof dl.hide.end === 'function') {
  10. dl.hide.end();
  11. }
  12. if (typeof dl.push === 'function') {
  13. dl.push = function (o) {
  14. if (
  15. typeof o === 'object'
  16. && typeof o.eventCallback === 'function'
  17. ) {
  18. // eslint-disable-next-line sukka/prefer-timer-id -- deliberately use setTimeout
  19. setTimeout(o.eventCallback, 1);
  20. }
  21. };
  22. }
  23. }());