Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…lfinance into feature/optimization
  • Loading branch information
Vaibhav sasulkar committed Oct 10, 2024
2 parents a6c89b6 + 0ededc4 commit 950e97d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions blocks/applyloanform/loanformapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ function verifyOtpBtnClick() {
}
}


// leadAPI(sessionStorage.getItem('accesstoken'), sessionStorage.getItem('otpAuthId'))
leadAPI(sessionStorage.getItem('accesstoken'), authUniqueId)
.catch((error) => {
console.warn(error);
Expand Down
4 changes: 2 additions & 2 deletions scripts/delayed.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ 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);

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;a<n;a++)t[a]=arguments[a];(e.moengage_q=e.moengage_q||[]).push({f:i,a:t})}},u=["track_event","add_user_attribute","add_first_name","add_last_name","add_email","add_mobile","add_user_name","add_gender","add_birthday","destroy_session","add_unique_user_id","update_unique_user_id","moe_events","call_web_push","track","location_type_attribute"],m={onsite:["getData","registerCallback"]};for(var c in u)l[u[c]]=g(u[c]);for(var v in m)for(var f in m[v])null==l[v]&&(l[v]={}),l[v][m[v][f]]=g(v+"."+m[v][f]);r=n.createElement(i),o=n.getElementsByTagName("head")[0],r.async=1,r.src=t,o.appendChild(r),e.moe=e.moe||function(){return(s.invoked=s.invoked+1,s.invoked>1)?(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;a<n;a++)t[a]=arguments[a];(e.moengage_q=e.moengage_q||[]).push({f:i,a:t})}},u=["track_event","add_user_attribute","add_first_name","add_last_name","add_email","add_mobile","add_user_name","add_gender","add_birthday","destroy_session","add_unique_user_id","update_unique_user_id","moe_events","call_web_push","track","location_type_attribute"],m={onsite:["getData","registerCallback"]};for(var c in u)l[u[c]]=g(u[c]);for(var v in m)for(var f in m[v])null==l[v]&&(l[v]={}),l[v][m[v][f]]=g(v+"."+m[v][f]);r=n.createElement(i),o=n.getElementsByTagName("head")[0],r.async=1,r.src=t,o.appendChild(r),e.moe=e.moe||function(){return(s.invoked=s.invoked+1,s.invoked>1)?(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);

Expand Down
2 changes: 1 addition & 1 deletion scripts/serviceworker.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Import external script from MoEngage CDN

importScripts("https://cdn.moengage.com/release/dc_3/serviceworker_cdn.min.latest.js");
importScripts("https://cdn.moengage.com/release/dc_0.3/serviceworker_cdn.min.latest.js");

0 comments on commit 950e97d

Please sign in to comment.