//Google Scripts window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } var gglImpression = function (k, b, t) { console.log('GOOGLE - Impression (' + k + ')'); if (t == 1) { window.dataLayer.push(b); (function (w, d, s, l, i) { w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); let f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; if (typeof(w[i + dl]) == "undefined") { w[i + dl] = true; j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl; } f.parentNode.insertBefore(j, f); })(window, document, 'script', 'dataLayer', k); } else if (t == 2) { window.dataLayer.push(b); (function (w, d, s, l, i) { w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); let f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = '//www.googletagmanager.com/gtag/js?id=' + i + dl; if (typeof(w[i + dl]) == "undefined") { w[i + dl] = true; f.parentNode.insertBefore(j, f); } })(window, document, 'script', 'dataLayer', k); gtag('js', new Date()); gtag('config', k); } }; var gglConversion = function (d, t, m, k, b) { dtm('send', 'ConversionStatus', { key: b }, function (response) { if (response.Allow) { console.log('S-GOOGLE - Conversion (' + d + ')'); gtag('event', 'conversion', { 'send_to': d + '/' + t, 'value': parseFloat(m), 'currency': 'USD', 'transaction_id': k }); } else { console.log('F-GOOGLE - Conversion (' + d + ')'); } }); }; dtm('register', 'Impression', function () { gglImpression('AW-663565327', { "CampaignCode": "ZEVO3P", "OfferCode": "ZEVO3P", "Version": 1.0000, "MediaId": "11429859", "PageCode": "About", "Domain": "www.zevooffer.com", "IsCloud": true, "IsTestSession": false }, 2); }); dtm('register', 'Conversion', function (data) { gglConversion('AW-663565327', 's8AqCM-WmMYBEI_otLwC', data.detail.response.SubTotal, data.detail.response.ConversionId, 'GOOGLE_AW-663565327s8AqCM-WmMYBEI_otLwC'); }); //Simpli.Fy Scripts var simplifyImpression = function (id) { console.log('SIMPLIFY - Impression (' + id + ')'); (function (e, t, n) { r = t.createElement('script'); r.async = 1; r.src = n; var u = t.getElementsByTagName('script')[0]; u.parentNode.insertBefore(r, u); })(window, document, 'https://tag.simpli.fi/sifitag/' + id); }; var simplifyConversion = function (k, id) { dtm('send', 'ConversionStatus', { key: k }, function (response) { if (response.Allow) { console.log('S-SIMPLIFY - Conversion (' + id + ')'); (function (e, t, n) { r = t.createElement('script'); r.async = 1; r.src = n; var u = t.getElementsByTagName('script')[0]; u.parentNode.insertBefore(r, u); })(window, document, 'https://tag.simpli.fi/sifitag/' + id); } else { console.log('F-SIMPLIFY - Conversion (' + id + ')'); } }); }; dtm('register', 'Impression', function () { simplifyImpression('e3941e20-5b34-0138-7133-067f653fa718'); }); dtm('register', 'Conversion', function (data) { simplifyConversion('SIMPLIFY_ec217730-5b34-0138-6b39-06659b33d47c', 'ec217730-5b34-0138-6b39-06659b33d47c'); });