@fynd-design-engineering/fynd-one-v2 3.3.45 → 3.3.47

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,147 +0,0 @@
1
- "use strict";
2
- (() => {
3
- // bin/live-reload.js
4
- if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
5
- new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
6
- "change",
7
- () => location.reload()
8
- );
9
- } else {
10
- console.log("Live reload disabled: not running on localhost");
11
- }
12
-
13
- // src/posthog/index.ts
14
- var getTrackingProperties = () => {
15
- const pathname = window.location.pathname;
16
- return {
17
- source_page: pathname === "/" ? pathname + " Home" : pathname,
18
- fynd_product: "fynd.com website",
19
- interface: "Webflow",
20
- device_type: /Mobile|Android|iPhone|iPad/.test(navigator.userAgent) ? "Mobile" : "Web",
21
- utm_source: new URLSearchParams(window.location.search).get("utm_source") || "",
22
- utm_medium: new URLSearchParams(window.location.search).get("utm_medium") || "",
23
- utm_campaign: new URLSearchParams(window.location.search).get("utm_campaign") || "",
24
- referrer: document.referrer
25
- };
26
- };
27
- var getTrackingPropertiesWithForm = (formName) => {
28
- return {
29
- ...getTrackingProperties(),
30
- form_name: formName
31
- };
32
- };
33
- var trackEvent = (eventName, properties, gaEventName) => {
34
- if (window.posthog) {
35
- window.posthog.capture(eventName, properties);
36
- }
37
- if (window.gtag) {
38
- const gtagEventName = gaEventName || eventName.replace("fynd_", "").replace(/_/g, "_");
39
- window.gtag("event", gtagEventName, {
40
- event_category: "fynd_engagement",
41
- event_label: properties.source_page,
42
- custom_source_page: properties.source_page,
43
- custom_fynd_product: properties.fynd_product,
44
- custom_interface: properties.interface,
45
- custom_device_type: properties.device_type,
46
- custom_utm_source: properties.utm_source,
47
- custom_utm_medium: properties.utm_medium,
48
- custom_utm_campaign: properties.utm_campaign,
49
- custom_referrer: properties.referrer,
50
- // Add form_name if it exists in properties
51
- ..."form_name" in properties && { custom_form_name: properties.form_name }
52
- });
53
- }
54
- };
55
- window.getTrackingProperties = getTrackingProperties;
56
- window.getTrackingPropertiesWithForm = getTrackingPropertiesWithForm;
57
- window.interactedForm = "";
58
- document.addEventListener("DOMContentLoaded", function() {
59
- const trackingProps = window.getTrackingProperties();
60
- if (window.posthog) {
61
- window.posthog.capture("$pageview", trackingProps);
62
- }
63
- if (window.gtag) {
64
- window.gtag("event", "page_view", {
65
- page_title: document.title,
66
- page_location: window.location.href,
67
- custom_source_page: trackingProps.source_page,
68
- custom_fynd_product: trackingProps.fynd_product,
69
- custom_interface: trackingProps.interface,
70
- custom_device_type: trackingProps.device_type,
71
- custom_utm_source: trackingProps.utm_source,
72
- custom_utm_medium: trackingProps.utm_medium,
73
- custom_utm_campaign: trackingProps.utm_campaign,
74
- custom_referrer: trackingProps.referrer
75
- });
76
- }
77
- });
78
- window.addEventListener("load", function() {
79
- trackEvent("fynd_page_loaded", window.getTrackingProperties(), "page_loaded");
80
- });
81
- document.addEventListener("DOMContentLoaded", function() {
82
- const signUpButtons = document.querySelectorAll('[data-ph="sign-up"]');
83
- const signInButtons = document.querySelectorAll('[data-ph="sign-in"]');
84
- const scrollToFormButtons = document.querySelectorAll(
85
- '[href="#footer-form"]'
86
- );
87
- const bookADemoButtons = document.querySelectorAll('[data-ph="book-a-demo"]');
88
- signUpButtons.forEach((button) => {
89
- button.addEventListener("click", function() {
90
- trackEvent("fynd_clicked_sign_up", window.getTrackingProperties(), "sign_up_click");
91
- });
92
- });
93
- signInButtons.forEach((button) => {
94
- button.addEventListener("click", function() {
95
- trackEvent("fynd_clicked_sign_in", window.getTrackingProperties(), "sign_in_click");
96
- });
97
- });
98
- scrollToFormButtons.forEach((button) => {
99
- button.addEventListener("click", function() {
100
- trackEvent("fynd_clicked_scroll_to_form", window.getTrackingProperties(), "scroll_to_form_click");
101
- });
102
- });
103
- bookADemoButtons.forEach((button) => {
104
- button.addEventListener("click", function() {
105
- trackEvent("fynd_clicked_book_a_demo", window.getTrackingProperties(), "book_demo_click");
106
- });
107
- });
108
- });
109
- document.addEventListener("DOMContentLoaded", function() {
110
- const formFields = document.querySelectorAll("[data-posthog-trigger]");
111
- console.log(
112
- "%cposthog/custom-events.js:58 formFields",
113
- "color: #007acc;",
114
- formFields
115
- );
116
- const processedForms = /* @__PURE__ */ new Set();
117
- formFields.forEach((field) => {
118
- field.addEventListener("change", function() {
119
- const parentForm = this.closest("form");
120
- if (parentForm) {
121
- if (processedForms.has(parentForm)) {
122
- return null;
123
- }
124
- processedForms.add(parentForm);
125
- const formName = parentForm.getAttribute("data-name");
126
- window.interactedForm = formName || "";
127
- if (formName) {
128
- console.log("form started");
129
- trackEvent(
130
- "fynd_form_started",
131
- window.getTrackingPropertiesWithForm(formName),
132
- "form_start"
133
- );
134
- return formName;
135
- } else {
136
- console.warn("No data-name attribute found on parent form");
137
- return null;
138
- }
139
- } else {
140
- console.warn("No parent form found");
141
- return null;
142
- }
143
- });
144
- });
145
- });
146
- })();
147
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../bin/live-reload.js", "../../src/posthog/index.ts"],
4
- "sourcesContent": ["// Only enable live reload when running on localhost\nif (\n window.location.hostname === \"localhost\" ||\n window.location.hostname === \"127.0.0.1\"\n) {\n new EventSource(`${SERVE_ORIGIN}/esbuild`).addEventListener(\"change\", () =>\n location.reload()\n );\n} else {\n console.log(\"Live reload disabled: not running on localhost\");\n}\n", "// Type definitions\ninterface TrackingProperties {\n source_page: string;\n fynd_product: string;\n interface: string;\n device_type: string;\n utm_source: string;\n utm_medium: string;\n utm_campaign: string;\n referrer: string;\n}\n\ninterface TrackingPropertiesWithForm extends TrackingProperties {\n form_name: string;\n}\n\n// PostHog interface\ninterface PostHog {\n capture: (eventName: string, properties: TrackingProperties | TrackingPropertiesWithForm) => void;\n}\n\n// Google Analytics gtag interface\ndeclare function gtag(command: string, targetId: string, config?: any): void;\n\n// Extend Window interface to include custom properties\ndeclare global {\n interface Window {\n getTrackingProperties: () => TrackingProperties;\n getTrackingPropertiesWithForm: (formName: string) => TrackingPropertiesWithForm;\n interactedForm: string;\n posthog: PostHog;\n gtag: typeof gtag;\n }\n}\n\n// This export statement is needed to make this file a module\n// and allow the global declarations to work properly\nexport { };\n\n// Default tracking properties function\nconst getTrackingProperties = (): TrackingProperties => {\n const pathname: string = window.location.pathname;\n\n return {\n source_page: pathname === \"/\" ? pathname + \" Home\" : pathname,\n fynd_product: \"fynd.com website\",\n interface: \"Webflow\",\n device_type: /Mobile|Android|iPhone|iPad/.test(navigator.userAgent)\n ? \"Mobile\"\n : \"Web\",\n utm_source:\n new URLSearchParams(window.location.search).get(\"utm_source\") || \"\",\n utm_medium:\n new URLSearchParams(window.location.search).get(\"utm_medium\") || \"\",\n utm_campaign:\n new URLSearchParams(window.location.search).get(\"utm_campaign\") || \"\",\n referrer: document.referrer,\n };\n};\n\n// Function to get tracking properties with form name\nconst getTrackingPropertiesWithForm = (formName: string): TrackingPropertiesWithForm => {\n return {\n ...getTrackingProperties(),\n form_name: formName,\n };\n};\n\n// Helper function to send events to both PostHog and GA4\nconst trackEvent = (eventName: string, properties: TrackingProperties | TrackingPropertiesWithForm, gaEventName?: string) => {\n // PostHog tracking\n if (window.posthog) {\n window.posthog.capture(eventName, properties);\n }\n\n // Google Analytics tracking\n if (window.gtag) {\n const gtagEventName = gaEventName || eventName.replace('fynd_', '').replace(/_/g, '_');\n window.gtag('event', gtagEventName, {\n event_category: 'fynd_engagement',\n event_label: properties.source_page,\n custom_source_page: properties.source_page,\n custom_fynd_product: properties.fynd_product,\n custom_interface: properties.interface,\n custom_device_type: properties.device_type,\n custom_utm_source: properties.utm_source,\n custom_utm_medium: properties.utm_medium,\n custom_utm_campaign: properties.utm_campaign,\n custom_referrer: properties.referrer,\n // Add form_name if it exists in properties\n ...(('form_name' in properties) && { custom_form_name: properties.form_name })\n });\n }\n};\n\n// Assign functions to window object\nwindow.getTrackingProperties = getTrackingProperties;\nwindow.getTrackingPropertiesWithForm = getTrackingPropertiesWithForm;\nwindow.interactedForm = \"\";\n\n// Getting parent form name by passing field element\nfunction getParentFormName(fieldElement: Element): string | null {\n const parentForm = fieldElement.closest(\"form\") as HTMLFormElement | null;\n if (parentForm) {\n const formName = parentForm.getAttribute(\"data-name\");\n return formName || null;\n }\n return null;\n}\n\n// Initialize PostHog pageview and GA4 page_view\ndocument.addEventListener(\"DOMContentLoaded\", function (): void {\n const trackingProps = window.getTrackingProperties();\n\n // PostHog pageview\n if (window.posthog) {\n window.posthog.capture(\"$pageview\", trackingProps);\n }\n\n // Google Analytics page_view (GA4 automatically tracks page_view, but we can send custom parameters)\n if (window.gtag) {\n window.gtag('event', 'page_view', {\n page_title: document.title,\n page_location: window.location.href,\n custom_source_page: trackingProps.source_page,\n custom_fynd_product: trackingProps.fynd_product,\n custom_interface: trackingProps.interface,\n custom_device_type: trackingProps.device_type,\n custom_utm_source: trackingProps.utm_source,\n custom_utm_medium: trackingProps.utm_medium,\n custom_utm_campaign: trackingProps.utm_campaign,\n custom_referrer: trackingProps.referrer\n });\n }\n});\n\n// Track page load event\nwindow.addEventListener(\"load\", function (): void {\n trackEvent(\"fynd_page_loaded\", window.getTrackingProperties(), \"page_loaded\");\n});\n\n// Button click tracking for sign up, sign in, scroll to form and book a demo buttons\ndocument.addEventListener(\"DOMContentLoaded\", function (): void {\n const signUpButtons = document.querySelectorAll('[data-ph=\"sign-up\"]') as NodeListOf<Element>;\n const signInButtons = document.querySelectorAll('[data-ph=\"sign-in\"]') as NodeListOf<Element>;\n const scrollToFormButtons = document.querySelectorAll(\n '[href=\"#footer-form\"]'\n ) as NodeListOf<Element>;\n const bookADemoButtons = document.querySelectorAll('[data-ph=\"book-a-demo\"]') as NodeListOf<Element>;\n\n signUpButtons.forEach((button: Element) => {\n button.addEventListener(\"click\", function (): void {\n trackEvent(\"fynd_clicked_sign_up\", window.getTrackingProperties(), \"sign_up_click\");\n });\n });\n\n signInButtons.forEach((button: Element) => {\n button.addEventListener(\"click\", function (): void {\n trackEvent(\"fynd_clicked_sign_in\", window.getTrackingProperties(), \"sign_in_click\");\n });\n });\n\n scrollToFormButtons.forEach((button: Element) => {\n button.addEventListener(\"click\", function (): void {\n trackEvent(\"fynd_clicked_scroll_to_form\", window.getTrackingProperties(), \"scroll_to_form_click\");\n });\n });\n\n bookADemoButtons.forEach((button: Element) => {\n button.addEventListener(\"click\", function (): void {\n trackEvent(\"fynd_clicked_book_a_demo\", window.getTrackingProperties(), \"book_demo_click\");\n });\n });\n});\n\n// Track form interactions\ndocument.addEventListener(\"DOMContentLoaded\", function (): void {\n // Select all form fields with data-posthog-trigger attribute\n const formFields = document.querySelectorAll(\"[data-posthog-trigger]\") as NodeListOf<Element>;\n console.log(\n \"%cposthog/custom-events.js:58 formFields\",\n \"color: #007acc;\",\n formFields\n );\n\n // Keep track of forms that have already been processed\n const processedForms = new Set<HTMLFormElement>();\n\n formFields.forEach((field: Element) => {\n field.addEventListener(\"change\", function (this: Element): string | null {\n // Find the parent form element\n const parentForm = this.closest(\"form\") as HTMLFormElement | null;\n\n if (parentForm) {\n // Check if this form has already been processed\n if (processedForms.has(parentForm)) {\n // console.log(\"Form already processed, skipping...\");\n return null;\n }\n\n // Mark this form as processed\n processedForms.add(parentForm);\n\n // Get the data-name attribute value from the parent form\n const formName = parentForm.getAttribute(\"data-name\");\n window.interactedForm = formName || \"\";\n\n if (formName) {\n console.log(\"form started\");\n trackEvent(\n \"fynd_form_started\",\n window.getTrackingPropertiesWithForm(formName),\n \"form_start\"\n );\n return formName;\n } else {\n console.warn(\"No data-name attribute found on parent form\");\n return null;\n }\n } else {\n console.warn(\"No parent form found\");\n return null;\n }\n });\n });\n});"],
5
- "mappings": ";;;AACA,MACE,OAAO,SAAS,aAAa,eAC7B,OAAO,SAAS,aAAa,aAC7B;AACA,QAAI,YAAY,GAAG,uBAAY,UAAU,EAAE;AAAA,MAAiB;AAAA,MAAU,MACpE,SAAS,OAAO;AAAA,IAClB;AAAA,EACF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B,QAAQ,CAAC,WAAoB;AAC7C,aAAO,iBAAiB,SAAS,WAAkB;AAC/C,mBAAW,+BAA+B,OAAO,sBAAsB,GAAG,sBAAsB;AAAA,MACpG,CAAC;AAAA,IACL,CAAC;AAED,qBAAiB,QAAQ,CAAC,WAAoB;AAC1C,aAAO,iBAAiB,SAAS,WAAkB;AAC/C,mBAAW,4BAA4B,OAAO,sBAAsB,GAAG,iBAAiB;AAAA,MAC5F,CAAC;AAAA,IACL,CAAC;AAAA,EACL,CAAC;AAGD,WAAS,iBAAiB,oBAAoB,WAAkB;AAE5D,UAAM,aAAa,SAAS,iBAAiB,wBAAwB;AACrE,YAAQ;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAGA,UAAM,iBAAiB,oBAAI,IAAqB;AAEhD,eAAW,QAAQ,CAAC,UAAmB;AACnC,YAAM,iBAAiB,UAAU,WAAwC;AAErE,cAAM,aAAa,KAAK,QAAQ,MAAM;AAEtC,YAAI,YAAY;AAEZ,cAAI,eAAe,IAAI,UAAU,GAAG;AAEhC,mBAAO;AAAA,UACX;AAGA,yBAAe,IAAI,UAAU;AAG7B,gBAAM,WAAW,WAAW,aAAa,WAAW;AACpD,iBAAO,iBAAiB,YAAY;AAEpC,cAAI,UAAU;AACV,oBAAQ,IAAI,cAAc;AAC1B;AAAA,cACI;AAAA,cACA,OAAO,8BAA8B,QAAQ;AAAA,cAC7C;AAAA,YACJ;AACA,mBAAO;AAAA,UACX,OAAO;AACH,oBAAQ,KAAK,6CAA6C;AAC1D,mBAAO;AAAA,UACX;AAAA,QACJ,OAAO;AACH,kBAAQ,KAAK,sBAAsB;AACnC,iBAAO;AAAA,QACX;AAAA,MACJ,CAAC;AAAA,IACL,CAAC;AAAA,EACL,CAAC;",
6
- "names": []
7
- }
@@ -1 +0,0 @@
1
- "use strict";(()=>{var g=()=>{let r={};try{let t=null;if(typeof window.getUserJourney=="function"&&(t=window.getUserJourney()),!t){let e=sessionStorage.getItem("userJourney");e&&(t=JSON.parse(e))}if(t&&t.formDetails){let e=t.formDetails;e.formId&&(r.form_id=e.formId),e.formName&&(r.form_name=e.formName),e.firstName&&(r.form_first_name=e.firstName),e.lastName&&(r.form_last_name=e.lastName),e.email&&(r.form_email=e.email),e.phone&&(r.form_phone=e.phone)}}catch(t){console.warn("Error getting user journey data for GA tracking:",t)}return r},d=()=>{let t={"fynd_website.source_page":window.location.pathname,"fynd_website.product":"fynd.com website","fynd_website.device_type":"Unknown","fynd_website.utm_source":new URLSearchParams(window.location.search).get("utm_source")||"","fynd_website.utm_medium":new URLSearchParams(window.location.search).get("utm_medium")||"","fynd_website.utm_campaign":new URLSearchParams(window.location.search).get("utm_campaign")||"","fynd_website.referrer":document.referrer};try{let e=null;if(typeof window.getUserJourney=="function"&&(e=window.getUserJourney()),!e){let n=sessionStorage.getItem("userJourney");n&&(e=JSON.parse(n))}if(e){if(t["fynd_website.journey_touchpoints"]=e.userJourney||e,e.formDetails){let n=e.formDetails;n.formId&&(t["fynd_website.form_id"]=n.formId),n.formName&&(t["fynd_website.form_name"]=n.formName),n.firstName&&(t["fynd_website.form_first_name"]=n.firstName),n.lastName&&(t["fynd_website.form_last_name"]=n.lastName),n.email&&(t["fynd_website.form_email"]=n.email),n.phone&&(t["fynd_website.form_phone"]=n.phone)}if(e.userJourney&&e.userJourney.length>0){t["fynd_website.journey_total_pages"]=e.userJourney.length,t["fynd_website.journey_touchpoints_count"]=e.userJourney.length,t["fynd_website.journey_first_page"]=e.userJourney[0].page,t["fynd_website.journey_current_page"]=e.userJourney[e.userJourney.length-1].page;let n=new Date(e.userJourney[0].time),a=new Date(e.userJourney[e.userJourney.length-1].time);t["fynd_website.journey_session_duration"]=Math.floor((a.getTime()-n.getTime())/1e3),t["fynd_website.journey_entry_time"]=e.userJourney[0].time,t["fynd_website.journey_exit_time"]=e.userJourney[e.userJourney.length-1].time}e.deviceCategory&&(t["fynd_website.device_type"]=e.deviceCategory),e.browser&&(t["fynd_website.journey_browser"]=e.browser),e.device&&(t["fynd_website.journey_device"]=e.device),e.origin&&(t["fynd_website.journey_origin"]=e.origin),e.utmPath&&(t["fynd_website.journey_utm_path"]=e.utmPath),e.scrollDepth&&(t["fynd_website.journey_scroll_depth"]=e.scrollDepth)}}catch(e){console.warn("Error getting user journey data for tracking:",e)}if(t["fynd_website.device_type"]==="Unknown"){let e=navigator.userAgent;/iPad/.test(e)||/Android/.test(e)&&!/Mobile/.test(e)||/Tablet/.test(e)?t["fynd_website.device_type"]="Tablet":/Mobile|iPhone|Android|BlackBerry|Opera Mini|IEMobile|WPDesktop/.test(e)?t["fynd_website.device_type"]="Mobile":t["fynd_website.device_type"]="Desktop"}return t},l=(r,t,e)=>{if(window.dataLayer){let n={event:r,event_category:"form_interaction",event_label:r,...t};e?.submitted_form&&(n.submitted_form=e.submitted_form),window.dataLayer.push(n)}else console.warn("dataLayer not available for GA tracking")},o=(r,t)=>{try{let e=d(),n=t?{...e,...t}:e;window.posthog&&window.posthog.capture(r,n);let a=g();(r.includes("form")||Object.keys(a).length>0||t?.submitted_form)&&l(r,a,t)}catch(e){console.error("Error tracking event:",e)}},y=r=>{let t=r.closest("form");return t&&(t.getAttribute("data-name")||t.getAttribute("name")||t.id)||null};document.addEventListener("DOMContentLoaded",function(){let r=d();window.posthog&&window.posthog.capture("$pageview",r)});window.addEventListener("load",function(){let r=d();o("fynd_website.page.loaded"),w()});function w(){if(window.location.pathname==="/thank-you"){let t=performance.getEntriesByType("navigation");t.length>0&&(t[0].type==="reload"||document.referrer&&new URL(document.referrer).origin===window.location.origin)&&setTimeout(()=>{o("fynd_website.form.success")},200)}}document.addEventListener("DOMContentLoaded",function(){let r=document.querySelectorAll('[data-ph="sign-up"]'),t=document.querySelectorAll('[data-ph="sign-in"]'),e=document.querySelectorAll('[href="#footer-form"]'),n=document.querySelectorAll('[data-ph="book-a-demo"]');document.querySelectorAll('[type="submit"]').forEach(i=>{i.addEventListener("click",function(){let s=y(this);setTimeout(()=>{window.validationPassed===!0&&o("fynd_website.form.submitted",s?{submitted_form:s}:{})},10)})}),r.forEach(i=>{i.addEventListener("click",function(){o("fynd_website.sign_up.clicked")})}),t.forEach(i=>{i.addEventListener("click",function(){o("fynd_website.sign_in.clicked")})}),e.forEach(i=>{i.addEventListener("click",function(){o("fynd_website.scroll_to_form.clicked")})}),n.forEach(i=>{i.addEventListener("click",function(){o("fynd_website.book_a_demo.clicked")})});let c=document.querySelectorAll("[ph-form-field]"),u=new Set;c.forEach(i=>{let s=i.tagName.toLowerCase(),m=i.type?.toLowerCase(),f=function(){let _=y(this)||"unknown-form";u.has(_)||(u.add(_),o("fynd_website.form.started"))};s==="button"||s==="input"&&m==="submit"||i.addEventListener("focus",f),s==="button"||s==="input"&&m==="submit"?i.addEventListener("click",f):s==="select"?i.addEventListener("change",f):i.addEventListener("input",f)})});window.getPosthogTrackingProperties=d;window.trackEvent=o;window.getGaTrackingProperties=g;})();
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../bin/live-reload.js", "../../src/posthog/main.ts"],
4
- "sourcesContent": ["// Only enable live reload when running on localhost\nif (\n window.location.hostname === \"localhost\" ||\n window.location.hostname === \"127.0.0.1\"\n) {\n new EventSource(`${SERVE_ORIGIN}/esbuild`).addEventListener(\"change\", () =>\n location.reload()\n );\n} else {\n console.log(\"Live reload disabled: not running on localhost\");\n}\n", "// trackingIntegration.ts - PostHog tracking with user journey integration\nimport { FormDetails, UserJourney } from '../utils/types/user-journey';\n\n// TypeScript interface for GTM dataLayer events\ninterface GTMEvent {\n event: string;\n event_category: string;\n event_label: string;\n form_id?: string;\n form_name?: string;\n form_first_name?: string;\n form_last_name?: string;\n form_email?: string;\n form_phone?: string;\n submitted_form?: string;\n [key: string]: any; // Allow additional properties\n}\n\n// GA tracking properties interface (form-related only)\ninterface GATrackingProperties {\n form_id?: string;\n form_name?: string;\n form_first_name?: string;\n form_last_name?: string;\n form_email?: string;\n form_phone?: string;\n submitted_form?: string;\n}\n\n// Define tracking properties interface\ninterface TrackingProperties {\n 'fynd_website.source_page': string;\n 'fynd_website.product': string;\n 'fynd_website.device_type': string;\n 'fynd_website.utm_source': string;\n 'fynd_website.utm_medium': string;\n 'fynd_website.utm_campaign': string;\n 'fynd_website.referrer': string;\n // Form details from user journey\n 'fynd_website.form_id'?: string;\n 'fynd_website.form_name'?: string;\n 'fynd_website.form_first_name'?: string;\n 'fynd_website.form_last_name'?: string;\n 'fynd_website.form_email'?: string;\n 'fynd_website.form_phone'?: string;\n // User journey details\n 'fynd_website.journey_total_pages'?: number;\n 'fynd_website.journey_session_duration'?: number;\n 'fynd_website.journey_first_page'?: string;\n 'fynd_website.journey_current_page'?: string;\n 'fynd_website.journey_device'?: string;\n 'fynd_website.journey_browser'?: string;\n 'fynd_website.journey_device_name'?: string;\n 'fynd_website.journey_origin'?: string;\n 'fynd_website.journey_touchpoints'?: any; // Array of touchpoints from userJourney field\n 'fynd_website.journey_touchpoints_count'?: number;\n 'fynd_website.journey_utm_path'?: string;\n 'fynd_website.journey_entry_time'?: string;\n 'fynd_website.journey_exit_time'?: string;\n 'fynd_website.journey_scroll_depth'?: number;\n // Additional event-specific properties\n submitted_form?: string;\n field_type?: string;\n field_name?: string;\n [key: string]: any; // Allow additional properties\n}\n\ndeclare global {\n interface Window {\n trackEvent: (eventName: string, properties?: any) => void;\n getPosthogTrackingProperties: () => TrackingProperties;\n getGaTrackingProperties: () => GATrackingProperties;\n validationPassed?: boolean;\n getUserJourney: () => UserJourney | null;\n dataLayer?: GTMEvent[];\n }\n}\n\n// GA tracking properties function (form-related data only)\nconst getGaTrackingProperties = (): GATrackingProperties => {\n const gaProperties: GATrackingProperties = {};\n\n // Get user journey data if available\n try {\n // Try to get from getUserJourney function first\n let journey = null;\n if (typeof (window as any).getUserJourney === 'function') {\n journey = (window as any).getUserJourney();\n }\n\n // If not available from function, try to get directly from sessionStorage\n if (!journey) {\n const storedData = sessionStorage.getItem('userJourney');\n if (storedData) {\n journey = JSON.parse(storedData);\n }\n }\n\n if (journey && journey.formDetails) {\n const formDetails: FormDetails = journey.formDetails;\n\n // Only add form properties if they have values\n if (formDetails.formId) {\n gaProperties.form_id = formDetails.formId;\n }\n if (formDetails.formName) {\n gaProperties.form_name = formDetails.formName;\n }\n if (formDetails.firstName) {\n gaProperties.form_first_name = formDetails.firstName;\n }\n if (formDetails.lastName) {\n gaProperties.form_last_name = formDetails.lastName;\n }\n if (formDetails.email) {\n gaProperties.form_email = formDetails.email;\n }\n if (formDetails.phone) {\n gaProperties.form_phone = formDetails.phone;\n }\n }\n } catch (error) {\n console.warn('Error getting user journey data for GA tracking:', error);\n }\n\n return gaProperties;\n};\n\n// Enhanced tracking properties function\nconst getPosthogTrackingProperties = (): TrackingProperties => {\n const pathname: string = window.location.pathname;\n\n // Base tracking properties\n const baseProperties: TrackingProperties = {\n 'fynd_website.source_page': pathname,\n 'fynd_website.product': \"fynd.com website\",\n 'fynd_website.device_type': \"Unknown\", // Will be updated from user journey\n 'fynd_website.utm_source':\n new URLSearchParams(window.location.search).get(\"utm_source\") || \"\",\n 'fynd_website.utm_medium':\n new URLSearchParams(window.location.search).get(\"utm_medium\") || \"\",\n 'fynd_website.utm_campaign':\n new URLSearchParams(window.location.search).get(\"utm_campaign\") || \"\",\n 'fynd_website.referrer': document.referrer,\n };\n\n // Get user journey data if available\n try {\n // Try to get from getUserJourney function first\n let journey = null;\n if (typeof (window as any).getUserJourney === 'function') {\n journey = (window as any).getUserJourney();\n }\n\n // If not available from function, try to get directly from sessionStorage\n if (!journey) {\n const storedData = sessionStorage.getItem('userJourney');\n if (storedData) {\n journey = JSON.parse(storedData);\n }\n }\n\n if (journey) {\n // Add the complete user journey object as touchpoints\n baseProperties['fynd_website.journey_touchpoints'] = journey.userJourney || journey;\n\n // Add form details if available\n if (journey.formDetails) {\n const formDetails: FormDetails = journey.formDetails;\n\n // Only add form properties if they have values\n if (formDetails.formId) {\n baseProperties['fynd_website.form_id'] = formDetails.formId;\n }\n if (formDetails.formName) {\n baseProperties['fynd_website.form_name'] = formDetails.formName;\n }\n if (formDetails.firstName) {\n baseProperties['fynd_website.form_first_name'] = formDetails.firstName;\n }\n if (formDetails.lastName) {\n baseProperties['fynd_website.form_last_name'] = formDetails.lastName;\n }\n if (formDetails.email) {\n baseProperties['fynd_website.form_email'] = formDetails.email;\n }\n if (formDetails.phone) {\n baseProperties['fynd_website.form_phone'] = formDetails.phone;\n }\n }\n\n // Add journey metadata\n if (journey.userJourney && journey.userJourney.length > 0) {\n baseProperties['fynd_website.journey_total_pages'] = journey.userJourney.length;\n baseProperties['fynd_website.journey_touchpoints_count'] = journey.userJourney.length;\n baseProperties['fynd_website.journey_first_page'] = journey.userJourney[0].page;\n baseProperties['fynd_website.journey_current_page'] = journey.userJourney[journey.userJourney.length - 1].page;\n\n // Calculate session duration\n const firstVisit = new Date(journey.userJourney[0].time);\n const lastVisit = new Date(journey.userJourney[journey.userJourney.length - 1].time);\n baseProperties['fynd_website.journey_session_duration'] = Math.floor((lastVisit.getTime() - firstVisit.getTime()) / 1000);\n \n // Add entry and exit times\n baseProperties['fynd_website.journey_entry_time'] = journey.userJourney[0].time;\n baseProperties['fynd_website.journey_exit_time'] = journey.userJourney[journey.userJourney.length - 1].time;\n }\n\n // Add device and browser info from journey\n if (journey.deviceCategory) {\n // Device category is already capitalized from user journey\n baseProperties['fynd_website.device_type'] = journey.deviceCategory;\n }\n if (journey.browser) {\n baseProperties['fynd_website.journey_browser'] = journey.browser;\n }\n if (journey.device) {\n baseProperties['fynd_website.journey_device'] = journey.device;\n }\n if (journey.origin) {\n baseProperties['fynd_website.journey_origin'] = journey.origin;\n }\n \n // Add UTM path if available\n if (journey.utmPath) {\n baseProperties['fynd_website.journey_utm_path'] = journey.utmPath;\n }\n \n // Add scroll depth if available\n if (journey.scrollDepth) {\n baseProperties['fynd_website.journey_scroll_depth'] = journey.scrollDepth;\n }\n }\n } catch (error) {\n console.warn('Error getting user journey data for tracking:', error);\n }\n\n // Fallback device type calculation if user journey isn't available\n if (baseProperties['fynd_website.device_type'] === \"Unknown\") {\n const userAgent = navigator.userAgent;\n \n // Check for tablets first\n if (/iPad/.test(userAgent) || \n (/Android/.test(userAgent) && !/Mobile/.test(userAgent)) ||\n /Tablet/.test(userAgent)) {\n baseProperties['fynd_website.device_type'] = \"Tablet\";\n }\n // Check for mobile devices\n else if (/Mobile|iPhone|Android|BlackBerry|Opera Mini|IEMobile|WPDesktop/.test(userAgent)) {\n baseProperties['fynd_website.device_type'] = \"Mobile\";\n }\n // Default to desktop\n else {\n baseProperties['fynd_website.device_type'] = \"Desktop\";\n }\n }\n\n return baseProperties;\n};\n\n// Function to send event to GA via dataLayer\nconst sendToGA = (eventName: string, gaProperties: GATrackingProperties, additionalProperties?: any): void => {\n if ((window as any).dataLayer) {\n const eventData: GTMEvent = {\n event: eventName,\n event_category: 'form_interaction',\n event_label: eventName,\n ...gaProperties\n };\n\n // Add submitted_form from additional properties if available\n if (additionalProperties?.submitted_form) {\n eventData.submitted_form = additionalProperties.submitted_form;\n }\n\n (window as any).dataLayer.push(eventData);\n // console.log('Event sent to GA:', eventData);\n } else {\n console.warn('dataLayer not available for GA tracking');\n }\n};\n\n// Track event function\nconst trackEvent = (eventName: string, properties?: Partial<TrackingProperties>): void => {\n try {\n // Get PostHog tracking properties (all data)\n const trackingProps = getPosthogTrackingProperties();\n\n // Merge with additional properties if provided\n const finalProperties = properties ? { ...trackingProps, ...properties } : trackingProps;\n\n // Track with PostHog if available\n if ((window as any).posthog) {\n (window as any).posthog.capture(eventName, finalProperties);\n // console.log('Event sent to PostHog:', { event: eventName, properties: finalProperties });\n }\n\n // Get GA tracking properties (form-related data only)\n const gaProperties = getGaTrackingProperties();\n\n // Only send to GA if there's form-related data or it's a form-related event\n const isFormRelatedEvent = eventName.includes('form') || \n Object.keys(gaProperties).length > 0 || \n properties?.submitted_form;\n\n if (isFormRelatedEvent) {\n sendToGA(eventName, gaProperties, properties);\n }\n\n // Optional: Console log for debugging (remove in production)\n // console.log('Tracked event:', eventName, finalProperties);\n } catch (error) {\n console.error('Error tracking event:', error);\n }\n};\n\n// Helper function to get parent form name\nconst getParentFormName = (element: HTMLElement): string | null => {\n const parentForm = element.closest(\"form\") as HTMLFormElement | null;\n if (parentForm) {\n return parentForm.getAttribute(\"data-name\") ||\n parentForm.getAttribute(\"name\") ||\n parentForm.id ||\n null;\n }\n return null;\n};\n\n// Initialize PostHog pageview\ndocument.addEventListener(\"DOMContentLoaded\", function (): void {\n const trackingProps = getPosthogTrackingProperties();\n\n // PostHog pageview\n if ((window as any).posthog) {\n (window as any).posthog.capture(\"$pageview\", trackingProps);\n }\n});\n\n// Track page load event\nwindow.addEventListener(\"load\", function (): void {\n const trackingProps = getPosthogTrackingProperties();\n // console.log(\"Tracking Properties on Page Load:\", trackingProps);\n \n trackEvent(\"fynd_website.page.loaded\");\n\n // Check if this is the thank you page and trigger form success event\n checkThankYouPageEvent();\n});\n\n// Function to check and trigger thank you page event\nfunction checkThankYouPageEvent(): void {\n const currentPath = window.location.pathname;\n\n // Check if current page is thank you page\n if (currentPath === '/thank-you') {\n // Check if this is a page reload (not initial navigation)\n const navigationEntries = performance.getEntriesByType('navigation');\n if (navigationEntries.length > 0) {\n const navEntry = navigationEntries[0] as PerformanceNavigationTiming;\n\n // Check if it's a reload (type === 'reload') or if there's a referrer from the same origin\n const isReload = navEntry.type === 'reload' ||\n (document.referrer && new URL(document.referrer).origin === window.location.origin);\n\n if (isReload) {\n // Trigger event after 200ms delay\n setTimeout(() => {\n trackEvent(\"fynd_website.form.success\");\n }, 200);\n }\n }\n }\n}\n\n// Button click tracking for sign up, sign in, scroll to form and book a demo buttons\ndocument.addEventListener(\"DOMContentLoaded\", function (): void {\n const signUpButtons = document.querySelectorAll('[data-ph=\"sign-up\"]') as NodeListOf<Element>;\n const signInButtons = document.querySelectorAll('[data-ph=\"sign-in\"]') as NodeListOf<Element>;\n const scrollToFormButtons = document.querySelectorAll(\n '[href=\"#footer-form\"]'\n ) as NodeListOf<Element>;\n const bookADemoButtons = document.querySelectorAll('[data-ph=\"book-a-demo\"]') as NodeListOf<Element>;\n const submitButtons = document.querySelectorAll('[type=\"submit\"]') as NodeListOf<Element>;\n\n submitButtons.forEach((button: Element) => {\n button.addEventListener(\"click\", function (this: HTMLElement): void {\n const formName = getParentFormName(this);\n setTimeout(() => {\n if (window.validationPassed === true) {\n // If validation passed, track the submit event\n const additionalProps = formName ? { submitted_form: formName } : {};\n trackEvent(\"fynd_website.form.submitted\", additionalProps);\n }\n }, 10);\n });\n });\n\n signUpButtons.forEach((button: Element) => {\n button.addEventListener(\"click\", function (): void {\n trackEvent(\"fynd_website.sign_up.clicked\");\n });\n });\n\n signInButtons.forEach((button: Element) => {\n button.addEventListener(\"click\", function (): void {\n trackEvent(\"fynd_website.sign_in.clicked\");\n });\n });\n\n scrollToFormButtons.forEach((button: Element) => {\n button.addEventListener(\"click\", function (): void {\n trackEvent(\"fynd_website.scroll_to_form.clicked\");\n });\n });\n\n bookADemoButtons.forEach((button: Element) => {\n button.addEventListener(\"click\", function (): void {\n trackEvent(\"fynd_website.book_a_demo.clicked\");\n });\n });\n\n // Form field change tracking for fynd_form_started event\n const formFields = document.querySelectorAll('[ph-form-field]') as NodeListOf<HTMLElement>;\n \n // Set to track which forms have already triggered the event\n const triggeredForms = new Set<string>();\n\n formFields.forEach((field: HTMLElement) => {\n // Handle different element types\n const tagName = field.tagName.toLowerCase();\n const inputType = (field as HTMLInputElement).type?.toLowerCase();\n \n // Function to handle form started event\n const handleFormStarted = function (this: HTMLElement): void {\n const formName = getParentFormName(this);\n const formIdentifier = formName || 'unknown-form';\n \n // Only trigger once per form to avoid duplicate events\n if (!triggeredForms.has(formIdentifier)) {\n triggeredForms.add(formIdentifier);\n \n trackEvent(\"fynd_website.form.started\");\n }\n };\n \n // Add focus event for all interactive form fields (except buttons)\n if (!(tagName === 'button' || (tagName === 'input' && inputType === 'submit'))) {\n field.addEventListener('focus', handleFormStarted);\n }\n \n // Add specific interaction events as before\n if (tagName === 'button' || (tagName === 'input' && inputType === 'submit')) {\n field.addEventListener('click', handleFormStarted);\n } else if (tagName === 'select') {\n field.addEventListener('change', handleFormStarted);\n } else {\n field.addEventListener('input', handleFormStarted);\n }\n });\n});\n\n// Make functions globally accessible\nwindow.getPosthogTrackingProperties = getPosthogTrackingProperties;\nwindow.trackEvent = trackEvent;\nwindow.getGaTrackingProperties = getGaTrackingProperties;\n\n// Export for module usage\nexport {\n getPosthogTrackingProperties,\n getGaTrackingProperties,\n trackEvent,\n sendToGA,\n getParentFormName,\n type TrackingProperties,\n type GATrackingProperties,\n type GTMEvent\n};"],
5
- "mappings": ";;;AACA,MACE,OAAO,SAAS,aAAa,eAC7B,OAAO,SAAS,aAAa,aAC7B;AACA,QAAI,YAAY,GAAG,uBAAY,UAAU,EAAE;AAAA,MAAiB;AAAA,MAAU,MACpE,SAAS,OAAO;AAAA,IAClB;AAAA,EACF,OAAO;AACL,YAAQ,IAAI,gDAAgD;AAAA,EAC9D;;;ACqEA,MAAM,0BAA0B,MAA4B;AACxD,UAAM,eAAqC,CAAC;AAG5C,QAAI;AAEA,UAAI,UAAU;AACd,UAAI,OAAQ,OAAe,mBAAmB,YAAY;AACtD,kBAAW,OAAe,eAAe;AAAA,MAC7C;AAGA,UAAI,CAAC,SAAS;AACV,cAAM,aAAa,eAAe,QAAQ,aAAa;AACvD,YAAI,YAAY;AACZ,oBAAU,KAAK,MAAM,UAAU;AAAA,QACnC;AAAA,MACJ;AAEA,UAAI,WAAW,QAAQ,aAAa;AAChC,cAAM,cAA2B,QAAQ;AAGzC,YAAI,YAAY,QAAQ;AACpB,uBAAa,UAAU,YAAY;AAAA,QACvC;AACA,YAAI,YAAY,UAAU;AACtB,uBAAa,YAAY,YAAY;AAAA,QACzC;AACA,YAAI,YAAY,WAAW;AACvB,uBAAa,kBAAkB,YAAY;AAAA,QAC/C;AACA,YAAI,YAAY,UAAU;AACtB,uBAAa,iBAAiB,YAAY;AAAA,QAC9C;AACA,YAAI,YAAY,OA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