.localStorage) {
window.localStorage.setItem("ecomsend_marketingId", marketingId)
}
}
checkMarketingEvent()
} catch (e) {}
let isEcomSendInitialized = false;
function createEcomSendMainJSEle() {
if (isEcomSendInitialized) return;
const ele = document.createElement("script");
ele.defer = true;
ele.id = "ecomsend-main-js";
ele.src = 'https://cdn.shopify.com/extensions/d14a2032-de91-4cef-bd47-781175efe95f/trustoo-email-popups-83/assets/ecomsend.js';
if (null === document.getElementById(ele.id)) {
document.head.appendChild(ele);
isEcomSendInitialized = true;
};
};
function EcomsendOnMobxLoaded() {
createEcomSendMainJSEle();
};
let checkCount = 0;
const maxChecks = 15;
function EcomsendBackupCheck() {
if (isEcomSendInitialized) return;
checkCount++;
if (window.React && window.ReactDOM) {
createEcomSendMainJSEle();
return;
}
if (checkCount
<