@heycater/qualification-funnel 1.19.20 → 1.19.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.
- package/dist/heycater-funnel.iife.js +96 -96
- package/dist/index.cjs.js +102 -102
- package/dist/index.esm.js +16 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -10264,6 +10264,20 @@ function trackOptimeleonConversion(eventName, serviceType) {
|
|
|
10264
10264
|
console.log("[Optimeleon Debug] window.optimeleon not available");
|
|
10265
10265
|
}
|
|
10266
10266
|
}
|
|
10267
|
+
function trackGtagConversion(eventName, params) {
|
|
10268
|
+
if (typeof window === "undefined") return;
|
|
10269
|
+
if (window.gtag) {
|
|
10270
|
+
try {
|
|
10271
|
+
window.gtag("event", eventName, {
|
|
10272
|
+
...params,
|
|
10273
|
+
transport_type: "beacon",
|
|
10274
|
+
send_to: getConfig().googleTagId || void 0
|
|
10275
|
+
});
|
|
10276
|
+
} catch (error) {
|
|
10277
|
+
console.error("[gtag] Failed to send event:", error);
|
|
10278
|
+
}
|
|
10279
|
+
}
|
|
10280
|
+
}
|
|
10267
10281
|
function serializeAnswerValue(value) {
|
|
10268
10282
|
if (value === void 0) return null;
|
|
10269
10283
|
if (value === null) return null;
|
|
@@ -26948,7 +26962,7 @@ function RequestForm({ header = null }) {
|
|
|
26948
26962
|
trackCompleted(funnelContextRef.current);
|
|
26949
26963
|
console.log("[Optimeleon Debug] Lead-only flow - tracking funnel_completed with:", effectiveServiceType);
|
|
26950
26964
|
trackOptimeleonConversion("funnel_completed", effectiveServiceType);
|
|
26951
|
-
|
|
26965
|
+
trackGtagConversion("submit_qf_request");
|
|
26952
26966
|
return;
|
|
26953
26967
|
} else {
|
|
26954
26968
|
console.error("[HeyCater Funnel] Lead submission failed. Result:", response);
|
|
@@ -27000,7 +27014,7 @@ function RequestForm({ header = null }) {
|
|
|
27000
27014
|
trackCompleted(funnelContextRef.current);
|
|
27001
27015
|
console.log("[Optimeleon Debug] Regular flow - tracking funnel_completed with:", effectiveServiceType);
|
|
27002
27016
|
trackOptimeleonConversion("funnel_completed", effectiveServiceType);
|
|
27003
|
-
|
|
27017
|
+
trackGtagConversion("submit_qf_request");
|
|
27004
27018
|
actions.setRequest(values2);
|
|
27005
27019
|
redirectToCustomerAccountRequest(redirectRoute);
|
|
27006
27020
|
};
|