@fynd-design-engineering/fynd-one-v2 3.4.20 → 3.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{function u(){try{let e=a();if(!e||e.userJourney.length===0)return;let r=e.userJourney[0],t=e.userJourney[e.userJourney.length-1];e.userJourney.length>1&&e.userJourney[e.userJourney.length-1].page==="/contact-us"&&(t=e.userJourney[e.userJourney.length-2]);let n={utm_source:r.utm.source,utm_medium:r.utm.medium,utm_campaign:r.utm.campaign,fp_custom_page_title:r.title,fp_custom_page_category:r.category.join(", "),fp_custom_page_type:r.type,fp_timestamp:r.time,fp_path:r.page,lp_custom_page_title:t.title,lp_custom_page_category:t.category.join(", "),lp_custom_page_type:t.type,lp_timestamp:t.time,lp_path:t.page,userjourney:JSON.stringify(e.userJourney),device:e.deviceCategory,browser:e.browser,refferer_domain:window.location.hostname,"current-page-url":window.location.href};Object.entries(n).forEach(([o,i])=>{c(o,i)})}catch(e){console.error("Error filling form with user journey data:",e)}}function a(){try{let e=
|
|
1
|
+
"use strict";(()=>{function u(){try{let e=a();if(!e||e.userJourney.length===0)return;let r=e.userJourney[0],t=e.userJourney[e.userJourney.length-1];e.userJourney.length>1&&e.userJourney[e.userJourney.length-1].page==="/contact-us"&&(t=e.userJourney[e.userJourney.length-2]);let n={utm_source:r.utm.source,utm_medium:r.utm.medium,utm_campaign:r.utm.campaign,fp_custom_page_title:r.title,fp_custom_page_category:r.category.join(", "),fp_custom_page_type:r.type,fp_timestamp:r.time,fp_path:r.page,lp_custom_page_title:t.title,lp_custom_page_category:t.category.join(", "),lp_custom_page_type:t.type,lp_timestamp:t.time,lp_path:t.page,userjourney:JSON.stringify(e.userJourney),device:e.deviceCategory,browser:e.browser,refferer_domain:window.location.hostname,"current-page-url":window.location.href};Object.entries(n).forEach(([o,i])=>{c(o,i)})}catch(e){console.error("Error filling form with user journey data:",e)}}function a(){try{let e=localStorage.getItem("userJourney");return e?JSON.parse(e):null}catch(e){return console.error("Error getting user journey data:",e),null}}function c(e,r){try{let t=`[fynd-queryparam-name="${e}"]`,n=document.querySelectorAll(t);n.length>0&&n.forEach(o=>{o.value=r;let i=new Event("input",{bubbles:!0});o.dispatchEvent(i);let s=new Event("change",{bubbles:!0});o.dispatchEvent(s)})}catch(t){console.error(`Error filling field [${e}]:`,t)}}document.addEventListener("DOMContentLoaded",()=>{setTimeout(()=>{u()},500)});document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{setTimeout(()=>{u()},500)}):setTimeout(()=>{u()},500);window.fillFormWithUserJourney=u;})();
|
package/package.json
CHANGED