From 0632ba72fe55e0012869e79866e6c74127031f8a Mon Sep 17 00:00:00 2001 From: Smit Shah Date: Thu, 10 Oct 2024 13:33:10 +0530 Subject: [PATCH] apened in head tag --- scripts/delayed.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/delayed.js b/scripts/delayed.js index b480127b26..1550d007e4 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -61,6 +61,8 @@ async function loadMoengage(){ scriptTag.innerHTML = ` !function(e,n,i,t,a,r,o,d){if(!moeDataCenter||!moeDataCenter.match(/^dc_[0-9]+$/gm))return console.error("Data center has not been passed correctly. Please follow the SDK installation instruction carefully.");var s=e[a]=e[a]||[];if(s.invoked=0,s.initialised>0||s.invoked>0)return console.error("MoEngage Web SDK initialised multiple times. Please integrate the Web SDK only once!"),!1;e.moengage_object=a;var l={},g=function n(i){return function(){for(var n=arguments.length,t=Array(n),a=0;a1)?(console.error("MoEngage Web SDK initialised multiple times. Please integrate the Web SDK only once!"),!1):(d=arguments.length<=0?void 0:arguments[0],l)},r.addEventListener("load",function(){if(d)return e[a]=e.moe(d),e[a].initialised=e[a].initialised+1||1,!0}),r.addEventListener("error",function(){return console.error("Moengage Web SDK loading failed."),!1})}(window,document,"script","https://cdn.moengage.com/release/"+${moeDataCenter}+"/moe_webSdk.min.latest.js","Moengage");`; + + document.head.append(scriptTag); Moengage = moe({ app_id: moeAppID,