window.CVENT.addTriggerHandlers('RegistrationConversion', function() { var elem = document.createElement("img"); elem.setAttribute("src", "https://px.ads.linkedin.com/collect/?pid=2538378&conversionId=4014217&fmt=gif"); elem.setAttribute("height", "1"); elem.setAttribute("width", "1"); elem.setAttribute("alt", ""); elem.setAttribute("style", "display:none;"); document.getElementsByTagName("body")[0].appendChild(elem); console.log("li reg fired"); }); window.CVENT.addTriggerHandlers('RegistrationConversion', function() { window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'Pageview', }); }); window.CVENT.addTriggerHandlers('AllPages', function() { (function(){var s = document.getElementsByTagName("script")[0]; var b = document.createElement("script"); b.type = "text/javascript";b.async = true; b.src = "https://www.googletagmanager.com/gtag/js?id=AW-516775036"; s.parentNode.insertBefore(b, s);})(); window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-516775036'); console.log("ads all fired"); console.log(window.location.href); if (window.location.href.indexOf("/confirmation") != -1){ gtag('event', 'conversion', {'send_to': 'AW-516775036/j18sCMSQmJAYEPy4tfYB'}); console.log("ads reg fired"); } }); window.CVENT.addTriggerHandlers('AllPages', function() { window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'Pageview', }); });