From 4d858d44a01c2a1ad249edb40e908837e9821776 Mon Sep 17 00:00:00 2001 From: Smit Shah Date: Thu, 10 Oct 2024 16:52:39 +0530 Subject: [PATCH 1/3] 0.3 dc adding --- scripts/delayed.js | 2 +- scripts/serviceworker.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/delayed.js b/scripts/delayed.js index 7ffd2f5342..36f9b247de 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -55,7 +55,7 @@ async function loadMoengage(){ const scriptTag = document.createElement('script'); scriptTag.type = 'text/javascript'; - var moeDataCenter = "dc_3"; // placeholders.monenage_dc; // Replace "DC" with the actual Data center value from the above table + var moeDataCenter = "dc_0.3"; // placeholders.monenage_dc; // Replace "DC" with the actual Data center value from the above table var moeAppID = "MSLKV5SKRDLGUKY8FB8NXQM3"; // placeholders.monenage_appid; // Replace "WorkspaceID" available in the settings page of MoEngage Dashboard. var debug_logs = 0; // placeholders.monegage_debuglog // MoEngage Web SDK uses a parameter debug_logs: 1 to detect that you are integrating in TEST environment. When you decide to take your website LIVE, just pass the parameter debug_logs: 0 and all data about your actual users would start appearing in LIVE environment var sdkVersion = ''; // Replace this value with the version of Web SDK that you intend to use. It is recommended to use the format x (major); diff --git a/scripts/serviceworker.js b/scripts/serviceworker.js index f991d412d6..01123278de 100644 --- a/scripts/serviceworker.js +++ b/scripts/serviceworker.js @@ -1,3 +1,3 @@ // Import external script from MoEngage CDN -importScripts("https://cdn.moengage.com/release/dc_3/serviceworker_cdn.min.latest.js"); \ No newline at end of file +importScripts("https://cdn.moengage.com/release/dc_0.3/serviceworker_cdn.min.latest.js"); \ No newline at end of file From d828e6c587a8e44520f5628115ad23c9ccfe3196 Mon Sep 17 00:00:00 2001 From: Smit Shah Date: Thu, 10 Oct 2024 17:54:30 +0530 Subject: [PATCH 2/3] form api changes and delayed changes --- blocks/applyloanform/loanformapi.js | 3 ++- scripts/delayed.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/blocks/applyloanform/loanformapi.js b/blocks/applyloanform/loanformapi.js index 5c45f623a9..c38e231e97 100644 --- a/blocks/applyloanform/loanformapi.js +++ b/blocks/applyloanform/loanformapi.js @@ -353,7 +353,8 @@ function verifyOtpBtnClick() { } } - leadAPI(sessionStorage.getItem('accesstoken'), authUniqueId) + // leadAPI(sessionStorage.getItem('accesstoken'), authUniqueId) + leadAPI(sessionStorage.getItem('accesstoken'), sessionStorage.getItem('otpAuthId')) .catch((error) => { console.warn(error); showNetworkFailedScreen(error); diff --git a/scripts/delayed.js b/scripts/delayed.js index 36f9b247de..19f09d95ca 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -62,7 +62,7 @@ async function loadMoengage(){ scriptTag.innerHTML = ` console.log('MoEngage Web SDK v${sdkVersion}'); - !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");`; + !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); From 0ededc4c869757497d113ad37ea68ff34effa2fe Mon Sep 17 00:00:00 2001 From: Smit Shah Date: Thu, 10 Oct 2024 18:00:40 +0530 Subject: [PATCH 3/3] loan form chanag revert --- blocks/applyloanform/loanformapi.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blocks/applyloanform/loanformapi.js b/blocks/applyloanform/loanformapi.js index c38e231e97..6756ba23d7 100644 --- a/blocks/applyloanform/loanformapi.js +++ b/blocks/applyloanform/loanformapi.js @@ -353,8 +353,9 @@ function verifyOtpBtnClick() { } } - // leadAPI(sessionStorage.getItem('accesstoken'), authUniqueId) - leadAPI(sessionStorage.getItem('accesstoken'), sessionStorage.getItem('otpAuthId')) + + // leadAPI(sessionStorage.getItem('accesstoken'), sessionStorage.getItem('otpAuthId')) + leadAPI(sessionStorage.getItem('accesstoken'), authUniqueId) .catch((error) => { console.warn(error); showNetworkFailedScreen(error);