(function() { var take = function() { //DDP const chatform=localStorage.getItem("chatform") document.addEventListener("DOMContentLoaded", () => { console.log("DOMContentLoaded DDP msm") var path = window.location.pathname; if(path.includes('/lp/cv_upsell')){ console.log("cv_upsel") var url = "https://pr.aqur.com/track"; function track(trackingData) { fetch(url, { method: "POST", headers: { "Content-Type": "application/json" }, body: trackingData }) .then(response => response.json()) .then(data => { console.log("Conversion Tracked!!") localStorage.removeItem("chatform") }) } track(chatform) } }) } setTimeout(take, 0); }())