(function () { const page = new URL(window.location.href); const isConfirmation = /^\/thank-you-demo\/?$/.test(page.pathname); const isDemoPage = /^\/(demo|apprenticeship-software-demo)\/?$/.test(page.pathname); if (!isConfirmation && !isDemoPage) return; if (window.appionDemoAdsInitialized) return; window.appionDemoAdsInitialized = true; // Avada's Marketing Cookies category controls when this snippet may run. window.dataLayer = window.dataLayer || []; window.gtag = window.gtag || function () { window.dataLayer.push(arguments); }; const adsId = 'AW-18573511979'; const settings = { allow_ad_personalization_signals: false }; if (isConfirmation) settings.page_location = page.origin + page.pathname; window.gtag('config', adsId, settings); const entryToken = page.searchParams.get('eid'); if (!isConfirmation || !entryToken || !/^[A-Za-z0-9+/_-]{40,512}={0,2}$/.test(entryToken)) return; window.crypto.subtle.digest('SHA-256', new TextEncoder().encode(entryToken)).then(function (digest) { const transactionId = Array.from(new Uint8Array(digest), function (byte) { return byte.toString(16).padStart(2, '0'); }).join(''); window.gtag('event', 'conversion', { send_to: adsId + '/dA9tCLKS9rcdEKuaxZhF', value: 1.0, currency: 'USD', transaction_id: transactionId, page_location: page.origin + page.pathname }); }); })();

Monthly Archives: July 2023

Go to Top