@heycater/qualification-funnel 1.19.19 → 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.css +1 -1
- package/dist/heycater-funnel.iife.js +96 -96
- package/dist/index.cjs.js +87 -87
- package/dist/index.esm.js +158 -121
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -4334,6 +4334,7 @@ const DEFAULT_CONFIG = {
|
|
|
4334
4334
|
host: "https://www.heycater.com",
|
|
4335
4335
|
graphqlEndpoint: "https://api.heycater.com/graphql",
|
|
4336
4336
|
googleMapsApiKey: "",
|
|
4337
|
+
googleTagId: "",
|
|
4337
4338
|
algoliaAppId: "",
|
|
4338
4339
|
algoliaSearchApiKey: "",
|
|
4339
4340
|
salesforceWebToLeadOid: "",
|
|
@@ -10220,6 +10221,22 @@ function trackStarted(context, initialStepId) {
|
|
|
10220
10221
|
captureEvent("qf_v14_started", properties);
|
|
10221
10222
|
trackOptimeleonConversion("funnel_started");
|
|
10222
10223
|
}
|
|
10224
|
+
function identifyUser(userId) {
|
|
10225
|
+
if (typeof window === "undefined") return;
|
|
10226
|
+
const { googleTagId } = getConfig();
|
|
10227
|
+
if (window.gtag && googleTagId) {
|
|
10228
|
+
try {
|
|
10229
|
+
window.gtag("config", googleTagId, { user_id: userId });
|
|
10230
|
+
} catch (error) {
|
|
10231
|
+
console.error("[gtag] Failed to identify user:", error);
|
|
10232
|
+
}
|
|
10233
|
+
}
|
|
10234
|
+
}
|
|
10235
|
+
function pushDataLayer(userId) {
|
|
10236
|
+
if (typeof window === "undefined") return;
|
|
10237
|
+
window.dataLayer = window.dataLayer || [];
|
|
10238
|
+
window.dataLayer.push({ userId });
|
|
10239
|
+
}
|
|
10223
10240
|
function trackOptimeleonConversion(eventName, serviceType) {
|
|
10224
10241
|
if (typeof window === "undefined") return;
|
|
10225
10242
|
console.log("[Optimeleon Debug] trackOptimeleonConversion called", {
|
|
@@ -10247,6 +10264,20 @@ function trackOptimeleonConversion(eventName, serviceType) {
|
|
|
10247
10264
|
console.log("[Optimeleon Debug] window.optimeleon not available");
|
|
10248
10265
|
}
|
|
10249
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
|
+
}
|
|
10250
10281
|
function serializeAnswerValue(value) {
|
|
10251
10282
|
if (value === void 0) return null;
|
|
10252
10283
|
if (value === null) return null;
|
|
@@ -12492,7 +12523,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
12492
12523
|
var ys = arrObjKeys(obj, inspect2);
|
|
12493
12524
|
var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
12494
12525
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
12495
|
-
var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
12526
|
+
var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
|
|
12496
12527
|
var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
12497
12528
|
var tag = constructorTag + (stringTag2 || protoTag ? "[" + $join.call($concat$1.call([], stringTag2 || [], protoTag || []), ": ") + "] " : "");
|
|
12498
12529
|
if (ys.length === 0) {
|
|
@@ -12517,25 +12548,25 @@ function canTrustToString(obj) {
|
|
|
12517
12548
|
return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
|
|
12518
12549
|
}
|
|
12519
12550
|
function isArray$3(obj) {
|
|
12520
|
-
return toStr(obj) === "[object Array]" && canTrustToString(obj);
|
|
12551
|
+
return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
|
|
12521
12552
|
}
|
|
12522
12553
|
function isDate(obj) {
|
|
12523
|
-
return toStr(obj) === "[object Date]" && canTrustToString(obj);
|
|
12554
|
+
return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
|
|
12524
12555
|
}
|
|
12525
12556
|
function isRegExp$1(obj) {
|
|
12526
|
-
return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
12557
|
+
return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
12527
12558
|
}
|
|
12528
12559
|
function isError(obj) {
|
|
12529
|
-
return toStr(obj) === "[object Error]" && canTrustToString(obj);
|
|
12560
|
+
return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
|
|
12530
12561
|
}
|
|
12531
12562
|
function isString(obj) {
|
|
12532
|
-
return toStr(obj) === "[object String]" && canTrustToString(obj);
|
|
12563
|
+
return toStr$1(obj) === "[object String]" && canTrustToString(obj);
|
|
12533
12564
|
}
|
|
12534
12565
|
function isNumber(obj) {
|
|
12535
|
-
return toStr(obj) === "[object Number]" && canTrustToString(obj);
|
|
12566
|
+
return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
|
|
12536
12567
|
}
|
|
12537
12568
|
function isBoolean(obj) {
|
|
12538
|
-
return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
12569
|
+
return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
12539
12570
|
}
|
|
12540
12571
|
function isSymbol(obj) {
|
|
12541
12572
|
if (hasShammedSymbols) {
|
|
@@ -12571,7 +12602,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
|
|
|
12571
12602
|
function has$4(obj, key) {
|
|
12572
12603
|
return hasOwn$1.call(obj, key);
|
|
12573
12604
|
}
|
|
12574
|
-
function toStr(obj) {
|
|
12605
|
+
function toStr$1(obj) {
|
|
12575
12606
|
return objectToString.call(obj);
|
|
12576
12607
|
}
|
|
12577
12608
|
function nameOf(f) {
|
|
@@ -12880,7 +12911,7 @@ var syntax = SyntaxError;
|
|
|
12880
12911
|
var uri = URIError;
|
|
12881
12912
|
var abs$1 = Math.abs;
|
|
12882
12913
|
var floor$1 = Math.floor;
|
|
12883
|
-
var max$
|
|
12914
|
+
var max$2 = Math.max;
|
|
12884
12915
|
var min$1 = Math.min;
|
|
12885
12916
|
var pow$1 = Math.pow;
|
|
12886
12917
|
var round$2 = Math.round;
|
|
@@ -13009,99 +13040,78 @@ function requireObject_getPrototypeOf() {
|
|
|
13009
13040
|
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
13010
13041
|
return Object_getPrototypeOf;
|
|
13011
13042
|
}
|
|
13012
|
-
var
|
|
13013
|
-
var
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
var
|
|
13018
|
-
var
|
|
13019
|
-
|
|
13020
|
-
|
|
13021
|
-
var
|
|
13022
|
-
|
|
13023
|
-
|
|
13024
|
-
|
|
13025
|
-
|
|
13026
|
-
|
|
13027
|
-
|
|
13028
|
-
|
|
13029
|
-
|
|
13030
|
-
}
|
|
13031
|
-
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
|
|
13043
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
13044
|
+
var toStr = Object.prototype.toString;
|
|
13045
|
+
var max$1 = Math.max;
|
|
13046
|
+
var funcType = "[object Function]";
|
|
13047
|
+
var concatty = function concatty2(a3, b2) {
|
|
13048
|
+
var arr = [];
|
|
13049
|
+
for (var i2 = 0; i2 < a3.length; i2 += 1) {
|
|
13050
|
+
arr[i2] = a3[i2];
|
|
13051
|
+
}
|
|
13052
|
+
for (var j = 0; j < b2.length; j += 1) {
|
|
13053
|
+
arr[j + a3.length] = b2[j];
|
|
13054
|
+
}
|
|
13055
|
+
return arr;
|
|
13056
|
+
};
|
|
13057
|
+
var slicy = function slicy2(arrLike, offset2) {
|
|
13058
|
+
var arr = [];
|
|
13059
|
+
for (var i2 = offset2, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
|
|
13060
|
+
arr[j] = arrLike[i2];
|
|
13061
|
+
}
|
|
13062
|
+
return arr;
|
|
13063
|
+
};
|
|
13064
|
+
var joiny = function(arr, joiner) {
|
|
13065
|
+
var str = "";
|
|
13066
|
+
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
13067
|
+
str += arr[i2];
|
|
13068
|
+
if (i2 + 1 < arr.length) {
|
|
13069
|
+
str += joiner;
|
|
13035
13070
|
}
|
|
13036
|
-
|
|
13037
|
-
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
|
|
13043
|
-
|
|
13071
|
+
}
|
|
13072
|
+
return str;
|
|
13073
|
+
};
|
|
13074
|
+
var implementation$1 = function bind(that) {
|
|
13075
|
+
var target = this;
|
|
13076
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
13077
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
13078
|
+
}
|
|
13079
|
+
var args = slicy(arguments, 1);
|
|
13080
|
+
var bound;
|
|
13081
|
+
var binder = function() {
|
|
13082
|
+
if (this instanceof bound) {
|
|
13083
|
+
var result = target.apply(
|
|
13084
|
+
this,
|
|
13085
|
+
concatty(args, arguments)
|
|
13086
|
+
);
|
|
13087
|
+
if (Object(result) === result) {
|
|
13088
|
+
return result;
|
|
13044
13089
|
}
|
|
13090
|
+
return this;
|
|
13045
13091
|
}
|
|
13046
|
-
return
|
|
13092
|
+
return target.apply(
|
|
13093
|
+
that,
|
|
13094
|
+
concatty(args, arguments)
|
|
13095
|
+
);
|
|
13047
13096
|
};
|
|
13048
|
-
|
|
13049
|
-
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
var
|
|
13056
|
-
if (this instanceof bound) {
|
|
13057
|
-
var result = target.apply(
|
|
13058
|
-
this,
|
|
13059
|
-
concatty(args, arguments)
|
|
13060
|
-
);
|
|
13061
|
-
if (Object(result) === result) {
|
|
13062
|
-
return result;
|
|
13063
|
-
}
|
|
13064
|
-
return this;
|
|
13065
|
-
}
|
|
13066
|
-
return target.apply(
|
|
13067
|
-
that,
|
|
13068
|
-
concatty(args, arguments)
|
|
13069
|
-
);
|
|
13097
|
+
var boundLength = max$1(0, target.length - args.length);
|
|
13098
|
+
var boundArgs = [];
|
|
13099
|
+
for (var i2 = 0; i2 < boundLength; i2++) {
|
|
13100
|
+
boundArgs[i2] = "$" + i2;
|
|
13101
|
+
}
|
|
13102
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
13103
|
+
if (target.prototype) {
|
|
13104
|
+
var Empty = function Empty2() {
|
|
13070
13105
|
};
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
Empty.prototype = target.prototype;
|
|
13081
|
-
bound.prototype = new Empty();
|
|
13082
|
-
Empty.prototype = null;
|
|
13083
|
-
}
|
|
13084
|
-
return bound;
|
|
13085
|
-
};
|
|
13086
|
-
return implementation;
|
|
13087
|
-
}
|
|
13088
|
-
var functionBind;
|
|
13089
|
-
var hasRequiredFunctionBind;
|
|
13090
|
-
function requireFunctionBind() {
|
|
13091
|
-
if (hasRequiredFunctionBind) return functionBind;
|
|
13092
|
-
hasRequiredFunctionBind = 1;
|
|
13093
|
-
var implementation2 = requireImplementation();
|
|
13094
|
-
functionBind = Function.prototype.bind || implementation2;
|
|
13095
|
-
return functionBind;
|
|
13096
|
-
}
|
|
13097
|
-
var functionCall;
|
|
13098
|
-
var hasRequiredFunctionCall;
|
|
13099
|
-
function requireFunctionCall() {
|
|
13100
|
-
if (hasRequiredFunctionCall) return functionCall;
|
|
13101
|
-
hasRequiredFunctionCall = 1;
|
|
13102
|
-
functionCall = Function.prototype.call;
|
|
13103
|
-
return functionCall;
|
|
13104
|
-
}
|
|
13106
|
+
Empty.prototype = target.prototype;
|
|
13107
|
+
bound.prototype = new Empty();
|
|
13108
|
+
Empty.prototype = null;
|
|
13109
|
+
}
|
|
13110
|
+
return bound;
|
|
13111
|
+
};
|
|
13112
|
+
var implementation = implementation$1;
|
|
13113
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
13114
|
+
var functionCall = Function.prototype.call;
|
|
13105
13115
|
var functionApply;
|
|
13106
13116
|
var hasRequiredFunctionApply;
|
|
13107
13117
|
function requireFunctionApply() {
|
|
@@ -13111,14 +13121,14 @@ function requireFunctionApply() {
|
|
|
13111
13121
|
return functionApply;
|
|
13112
13122
|
}
|
|
13113
13123
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
13114
|
-
var bind$2 =
|
|
13124
|
+
var bind$2 = functionBind;
|
|
13115
13125
|
var $apply$1 = requireFunctionApply();
|
|
13116
|
-
var $call$2 =
|
|
13126
|
+
var $call$2 = functionCall;
|
|
13117
13127
|
var $reflectApply = reflectApply;
|
|
13118
13128
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
13119
|
-
var bind$1 =
|
|
13129
|
+
var bind$1 = functionBind;
|
|
13120
13130
|
var $TypeError$4 = type;
|
|
13121
|
-
var $call$1 =
|
|
13131
|
+
var $call$1 = functionCall;
|
|
13122
13132
|
var $actualApply = actualApply;
|
|
13123
13133
|
var callBindApplyHelpers = function callBindBasic(args) {
|
|
13124
13134
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -13184,8 +13194,8 @@ function requireHasown() {
|
|
|
13184
13194
|
hasRequiredHasown = 1;
|
|
13185
13195
|
var call = Function.prototype.call;
|
|
13186
13196
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
13187
|
-
var
|
|
13188
|
-
hasown =
|
|
13197
|
+
var bind3 = functionBind;
|
|
13198
|
+
hasown = bind3.call(call, $hasOwn);
|
|
13189
13199
|
return hasown;
|
|
13190
13200
|
}
|
|
13191
13201
|
var undefined$1;
|
|
@@ -13199,7 +13209,7 @@ var $TypeError$3 = type;
|
|
|
13199
13209
|
var $URIError = uri;
|
|
13200
13210
|
var abs = abs$1;
|
|
13201
13211
|
var floor = floor$1;
|
|
13202
|
-
var max = max$
|
|
13212
|
+
var max = max$2;
|
|
13203
13213
|
var min = min$1;
|
|
13204
13214
|
var pow = pow$1;
|
|
13205
13215
|
var round$1 = round$2;
|
|
@@ -13233,7 +13243,7 @@ var getProto = requireGetProto();
|
|
|
13233
13243
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
13234
13244
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
13235
13245
|
var $apply = requireFunctionApply();
|
|
13236
|
-
var $call =
|
|
13246
|
+
var $call = functionCall;
|
|
13237
13247
|
var needsEval = {};
|
|
13238
13248
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
13239
13249
|
var INTRINSICS = {
|
|
@@ -13404,13 +13414,13 @@ var LEGACY_ALIASES = {
|
|
|
13404
13414
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
13405
13415
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
13406
13416
|
};
|
|
13407
|
-
var
|
|
13417
|
+
var bind2 = functionBind;
|
|
13408
13418
|
var hasOwn = requireHasown();
|
|
13409
|
-
var $concat =
|
|
13410
|
-
var $spliceApply =
|
|
13411
|
-
var $replace =
|
|
13412
|
-
var $strSlice =
|
|
13413
|
-
var $exec =
|
|
13419
|
+
var $concat = bind2.call($call, Array.prototype.concat);
|
|
13420
|
+
var $spliceApply = bind2.call($apply, Array.prototype.splice);
|
|
13421
|
+
var $replace = bind2.call($call, String.prototype.replace);
|
|
13422
|
+
var $strSlice = bind2.call($call, String.prototype.slice);
|
|
13423
|
+
var $exec = bind2.call($call, RegExp.prototype.exec);
|
|
13414
13424
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
13415
13425
|
var reEscapeChar = /\\(\\)?/g;
|
|
13416
13426
|
var stringToPath = function stringToPath2(string2) {
|
|
@@ -14427,7 +14437,7 @@ const redirectToMarketplace = (url) => {
|
|
|
14427
14437
|
const redirectToCustomerAccountRequest = (path = "/") => {
|
|
14428
14438
|
window.location.href = `${getConfig().customerAppHost}${path}`;
|
|
14429
14439
|
};
|
|
14430
|
-
const getCookie = (name) => {
|
|
14440
|
+
const getCookie$1 = (name) => {
|
|
14431
14441
|
const match2 = document.cookie.match(new RegExp("(^| )" + name + "=([^;]+)"));
|
|
14432
14442
|
return match2 ? decodeURIComponent(match2[2]) : void 0;
|
|
14433
14443
|
};
|
|
@@ -14554,8 +14564,8 @@ function createOpportunityCreationPayload(payload) {
|
|
|
14554
14564
|
staff: service,
|
|
14555
14565
|
locationCity: deliveryAddressCity,
|
|
14556
14566
|
conversionUrl: conversion_url,
|
|
14557
|
-
entranceUrl: getCookie("entrance_url"),
|
|
14558
|
-
referrerUrl: getCookie("referrer_url"),
|
|
14567
|
+
entranceUrl: getCookie$1("entrance_url"),
|
|
14568
|
+
referrerUrl: getCookie$1("referrer_url"),
|
|
14559
14569
|
degreeOfSatiation: degree_of_satiation,
|
|
14560
14570
|
eventsAttributes: [
|
|
14561
14571
|
{
|
|
@@ -26687,7 +26697,12 @@ function useQfLeadCreator() {
|
|
|
26687
26697
|
service_type,
|
|
26688
26698
|
team_size,
|
|
26689
26699
|
delivery_frequency,
|
|
26690
|
-
budget_range
|
|
26700
|
+
budget_range,
|
|
26701
|
+
leadSource,
|
|
26702
|
+
conversionUrl,
|
|
26703
|
+
entranceUrl,
|
|
26704
|
+
referrerUrl,
|
|
26705
|
+
landingPageSource
|
|
26691
26706
|
} = variables;
|
|
26692
26707
|
const numberOfPeople = number_of_vegans + number_of_vegetarians + number_of_carnivore;
|
|
26693
26708
|
const {
|
|
@@ -26714,7 +26729,12 @@ function useQfLeadCreator() {
|
|
|
26714
26729
|
serviceType: service_type,
|
|
26715
26730
|
teamSize: team_size,
|
|
26716
26731
|
deliveryFrequency: delivery_frequency,
|
|
26717
|
-
budgetRange: budget_range
|
|
26732
|
+
budgetRange: budget_range,
|
|
26733
|
+
leadSource,
|
|
26734
|
+
conversionUrl,
|
|
26735
|
+
entranceUrl,
|
|
26736
|
+
referrerUrl,
|
|
26737
|
+
landingPageSource
|
|
26718
26738
|
},
|
|
26719
26739
|
{ client }
|
|
26720
26740
|
);
|
|
@@ -26731,6 +26751,10 @@ function useQfLeadCreator() {
|
|
|
26731
26751
|
createQfLead
|
|
26732
26752
|
};
|
|
26733
26753
|
}
|
|
26754
|
+
const getCookie = (name) => {
|
|
26755
|
+
const match2 = document.cookie.match(new RegExp("(^| )" + name + "=([^;]+)"));
|
|
26756
|
+
return match2 ? decodeURIComponent(match2[2]) : void 0;
|
|
26757
|
+
};
|
|
26734
26758
|
function useRequestForm() {
|
|
26735
26759
|
const { state } = useQualification();
|
|
26736
26760
|
const qualification = "qualification" in state ? state.qualification : null;
|
|
@@ -26780,7 +26804,7 @@ function useRequestForm() {
|
|
|
26780
26804
|
return opportunity;
|
|
26781
26805
|
};
|
|
26782
26806
|
const submitAsNewCustomer = async (values2) => {
|
|
26783
|
-
var _a2;
|
|
26807
|
+
var _a2, _b;
|
|
26784
26808
|
const serviceType = (_a2 = qualification == null ? void 0 : qualification.answers) == null ? void 0 : _a2.service_type;
|
|
26785
26809
|
const isLeadOnlyFunnel = serviceType === "regular_employee_catering" || serviceType === "full_service_event";
|
|
26786
26810
|
const { deliveryAddressCountry } = values2;
|
|
@@ -26789,9 +26813,15 @@ function useRequestForm() {
|
|
|
26789
26813
|
);
|
|
26790
26814
|
if (isLeadOnlyFunnel || isUkLead) {
|
|
26791
26815
|
try {
|
|
26816
|
+
const leadSource = ((_b = qualification == null ? void 0 : qualification.leadSource) == null ? void 0 : _b.includes("/events")) ? "events-landingpage" : "Qualification Funnel";
|
|
26792
26817
|
const response = await createQfLead({
|
|
26793
26818
|
...values2,
|
|
26794
|
-
...qualification == null ? void 0 : qualification.answers
|
|
26819
|
+
...qualification == null ? void 0 : qualification.answers,
|
|
26820
|
+
leadSource,
|
|
26821
|
+
conversionUrl: window.location.href,
|
|
26822
|
+
entranceUrl: getCookie("entrance_url"),
|
|
26823
|
+
referrerUrl: getCookie("referrer_url"),
|
|
26824
|
+
landingPageSource: qualification == null ? void 0 : qualification.leadSource
|
|
26795
26825
|
});
|
|
26796
26826
|
if (!response) {
|
|
26797
26827
|
console.error("[HeyCater Funnel] createQfLead returned undefined/null");
|
|
@@ -26932,7 +26962,7 @@ function RequestForm({ header = null }) {
|
|
|
26932
26962
|
trackCompleted(funnelContextRef.current);
|
|
26933
26963
|
console.log("[Optimeleon Debug] Lead-only flow - tracking funnel_completed with:", effectiveServiceType);
|
|
26934
26964
|
trackOptimeleonConversion("funnel_completed", effectiveServiceType);
|
|
26935
|
-
|
|
26965
|
+
trackGtagConversion("submit_qf_request");
|
|
26936
26966
|
return;
|
|
26937
26967
|
} else {
|
|
26938
26968
|
console.error("[HeyCater Funnel] Lead submission failed. Result:", response);
|
|
@@ -26941,6 +26971,7 @@ function RequestForm({ header = null }) {
|
|
|
26941
26971
|
}
|
|
26942
26972
|
}
|
|
26943
26973
|
let redirectRoute = "";
|
|
26974
|
+
let userId = "";
|
|
26944
26975
|
if (currentUserAccount) {
|
|
26945
26976
|
try {
|
|
26946
26977
|
const opportunity = await submitAsExistingCustomer(values2);
|
|
@@ -26949,6 +26980,7 @@ function RequestForm({ header = null }) {
|
|
|
26949
26980
|
handleDisableCTA(false);
|
|
26950
26981
|
return;
|
|
26951
26982
|
}
|
|
26983
|
+
userId = opportunity.userId;
|
|
26952
26984
|
redirectRoute = `/account/requests/${opportunity.id}`;
|
|
26953
26985
|
} catch (err) {
|
|
26954
26986
|
if (err instanceof Error) {
|
|
@@ -26965,19 +26997,24 @@ function RequestForm({ header = null }) {
|
|
|
26965
26997
|
handleDisableCTA(false);
|
|
26966
26998
|
return;
|
|
26967
26999
|
}
|
|
27000
|
+
userId = opportunity.userId;
|
|
26968
27001
|
if (signInToken) {
|
|
26969
27002
|
redirectRoute = `/${router.locale}/account/requests/${opportunity.id}?one_time_sign_in_token=${signInToken}`;
|
|
26970
27003
|
} else {
|
|
26971
27004
|
redirectRoute = `/${router.locale}/account/external/requests/${opportunity.id}`;
|
|
26972
27005
|
}
|
|
26973
27006
|
}
|
|
27007
|
+
if (userId) {
|
|
27008
|
+
identifyUser(userId);
|
|
27009
|
+
pushDataLayer(userId);
|
|
27010
|
+
}
|
|
26974
27011
|
trackFormSubmitted(funnelContextRef.current, {
|
|
26975
27012
|
is_logged_in: !!currentUserAccount
|
|
26976
27013
|
});
|
|
26977
27014
|
trackCompleted(funnelContextRef.current);
|
|
26978
27015
|
console.log("[Optimeleon Debug] Regular flow - tracking funnel_completed with:", effectiveServiceType);
|
|
26979
27016
|
trackOptimeleonConversion("funnel_completed", effectiveServiceType);
|
|
26980
|
-
|
|
27017
|
+
trackGtagConversion("submit_qf_request");
|
|
26981
27018
|
actions.setRequest(values2);
|
|
26982
27019
|
redirectToCustomerAccountRequest(redirectRoute);
|
|
26983
27020
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.rdp{--rdp-cell-size: 40px;--rdp-caption-font-size: 18px;--rdp-accent-color: #0000ff;--rdp-background-color: #e7edff;--rdp-accent-color-dark: #3003e1;--rdp-background-color-dark: #180270;--rdp-outline: 2px solid var(--rdp-accent-color);--rdp-outline-selected: 3px solid var(--rdp-accent-color);--rdp-selected-color: #fff;margin:1em}.rdp-vhidden{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute!important;top:0;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip:rect(1px,1px,1px,1px)!important;border:0!important}.rdp-button_reset{appearance:none;position:relative;margin:0;padding:0;cursor:default;color:inherit;background:none;font:inherit;-moz-appearance:none;-webkit-appearance:none}.rdp-button_reset:focus-visible{outline:none}.rdp-button{border:2px solid transparent}.rdp-button[disabled]:not(.rdp-day_selected){opacity:.25}.rdp-button:not([disabled]){cursor:pointer}.rdp-button:focus-visible:not([disabled]){color:inherit;background-color:var(--rdp-background-color);border:var(--rdp-outline)}.rdp-button:hover:not([disabled]):not(.rdp-day_selected){background-color:var(--rdp-background-color)}.rdp-months{display:flex}.rdp-month{margin:0 1em}.rdp-month:first-child{margin-left:0}.rdp-month:last-child{margin-right:0}.rdp-table{margin:0;max-width:calc(var(--rdp-cell-size) * 7);border-collapse:collapse}.rdp-with_weeknumber .rdp-table{max-width:calc(var(--rdp-cell-size) * 8);border-collapse:collapse}.rdp-caption{display:flex;align-items:center;justify-content:space-between;padding:0;text-align:left}.rdp-multiple_months .rdp-caption{position:relative;display:block;text-align:center}.rdp-caption_dropdowns{position:relative;display:inline-flex}.rdp-caption_label{position:relative;z-index:1;display:inline-flex;align-items:center;margin:0;padding:0 .25em;white-space:nowrap;color:currentColor;border:0;border:2px solid transparent;font-family:inherit;font-size:var(--rdp-caption-font-size);font-weight:700}.rdp-nav{white-space:nowrap}.rdp-multiple_months .rdp-caption_start .rdp-nav{position:absolute;top:50%;left:0;transform:translateY(-50%)}.rdp-multiple_months .rdp-caption_end .rdp-nav{position:absolute;top:50%;right:0;transform:translateY(-50%)}.rdp-nav_button{display:inline-flex;align-items:center;justify-content:center;width:var(--rdp-cell-size);height:var(--rdp-cell-size);padding:.25em;border-radius:100%}.rdp-dropdown_year,.rdp-dropdown_month{position:relative;display:inline-flex;align-items:center}.rdp-dropdown{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;z-index:2;top:0;bottom:0;left:0;width:100%;margin:0;padding:0;cursor:inherit;opacity:0;border:none;background-color:transparent;font-family:inherit;font-size:inherit;line-height:inherit}.rdp-dropdown[disabled]{opacity:unset;color:unset}.rdp-dropdown:focus-visible:not([disabled])+.rdp-caption_label{background-color:var(--rdp-background-color);border:var(--rdp-outline);border-radius:6px}.rdp-dropdown_icon{margin:0 0 0 5px}.rdp-head{border:0}.rdp-head_row,.rdp-row{height:100%}.rdp-head_cell{vertical-align:middle;font-size:.75em;font-weight:700;text-align:center;height:100%;height:var(--rdp-cell-size);padding:0;text-transform:uppercase}.rdp-tbody{border:0}.rdp-tfoot{margin:.5em}.rdp-cell{width:var(--rdp-cell-size);height:100%;height:var(--rdp-cell-size);padding:0;text-align:center}.rdp-weeknumber{font-size:.75em}.rdp-weeknumber,.rdp-day{display:flex;overflow:hidden;align-items:center;justify-content:center;box-sizing:border-box;width:var(--rdp-cell-size);max-width:var(--rdp-cell-size);height:var(--rdp-cell-size);margin:0;border:2px solid transparent;border-radius:100%}.rdp-day_today:not(.rdp-day_outside){font-weight:700}.rdp-day_selected,.rdp-day_selected:focus-visible,.rdp-day_selected:hover{color:var(--rdp-selected-color);opacity:1;background-color:var(--rdp-accent-color)}.rdp-day_outside{opacity:.5}.rdp-day_selected:focus-visible{outline:var(--rdp-outline);outline-offset:2px;z-index:1}.rdp:not([dir=rtl]) .rdp-day_range_start:not(.rdp-day_range_end){border-top-right-radius:0;border-bottom-right-radius:0}.rdp:not([dir=rtl]) .rdp-day_range_end:not(.rdp-day_range_start){border-top-left-radius:0;border-bottom-left-radius:0}.rdp[dir=rtl] .rdp-day_range_start:not(.rdp-day_range_end){border-top-left-radius:0;border-bottom-left-radius:0}.rdp[dir=rtl] .rdp-day_range_end:not(.rdp-day_range_start){border-top-right-radius:0;border-bottom-right-radius:0}.rdp-day_range_end.rdp-day_range_start{border-radius:100%}.rdp-day_range_middle{border-radius:0}
|
|
1
|
+
.rdp{--rdp-cell-size: 40px;--rdp-caption-font-size: 18px;--rdp-accent-color: #0000ff;--rdp-background-color: #e7edff;--rdp-accent-color-dark: #3003e1;--rdp-background-color-dark: #180270;--rdp-outline: 2px solid var(--rdp-accent-color);--rdp-outline-selected: 3px solid var(--rdp-accent-color);--rdp-selected-color: #fff;margin:1em}.rdp-vhidden{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute!important;top:0;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip:rect(1px,1px,1px,1px)!important;border:0!important}.rdp-button_reset{appearance:none;position:relative;margin:0;padding:0;cursor:default;color:inherit;background:none;font:inherit;-moz-appearance:none;-webkit-appearance:none}.rdp-button_reset:focus-visible{outline:none}.rdp-button{border:2px solid transparent}.rdp-button[disabled]:not(.rdp-day_selected){opacity:.25}.rdp-button:not([disabled]){cursor:pointer}.rdp-button:focus-visible:not([disabled]){color:inherit;background-color:var(--rdp-background-color);border:var(--rdp-outline)}.rdp-button:hover:not([disabled]):not(.rdp-day_selected){background-color:var(--rdp-background-color)}.rdp-months{display:flex}.rdp-month{margin:0 1em}.rdp-month:first-child{margin-left:0}.rdp-month:last-child{margin-right:0}.rdp-table{margin:0;max-width:calc(var(--rdp-cell-size) * 7);border-collapse:collapse}.rdp-with_weeknumber .rdp-table{max-width:calc(var(--rdp-cell-size) * 8);border-collapse:collapse}.rdp-caption{display:flex;align-items:center;justify-content:space-between;padding:0;text-align:left}.rdp-multiple_months .rdp-caption{position:relative;display:block;text-align:center}.rdp-caption_dropdowns{position:relative;display:inline-flex}.rdp-caption_label{position:relative;z-index:1;display:inline-flex;align-items:center;margin:0;padding:0 .25em;white-space:nowrap;color:currentColor;border:0;border:2px solid transparent;font-family:inherit;font-size:var(--rdp-caption-font-size);font-weight:700}.rdp-nav{white-space:nowrap}.rdp-multiple_months .rdp-caption_start .rdp-nav{position:absolute;top:50%;left:0;transform:translateY(-50%)}.rdp-multiple_months .rdp-caption_end .rdp-nav{position:absolute;top:50%;right:0;transform:translateY(-50%)}.rdp-nav_button{display:inline-flex;align-items:center;justify-content:center;width:var(--rdp-cell-size);height:var(--rdp-cell-size);padding:.25em;border-radius:100%}.rdp-dropdown_year,.rdp-dropdown_month{position:relative;display:inline-flex;align-items:center}.rdp-dropdown{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;z-index:2;top:0;bottom:0;left:0;width:100%;margin:0;padding:0;cursor:inherit;opacity:0;border:none;background-color:transparent;font-family:inherit;font-size:inherit;line-height:inherit}.rdp-dropdown[disabled]{opacity:unset;color:unset}.rdp-dropdown:focus-visible:not([disabled])+.rdp-caption_label{background-color:var(--rdp-background-color);border:var(--rdp-outline);border-radius:6px}.rdp-dropdown_icon{margin:0 0 0 5px}.rdp-head{border:0}.rdp-head_row,.rdp-row{height:100%}.rdp-head_cell{vertical-align:middle;font-size:.75em;font-weight:700;text-align:center;height:100%;height:var(--rdp-cell-size);padding:0;text-transform:uppercase}.rdp-tbody{border:0}.rdp-tfoot{margin:.5em}.rdp-cell{width:var(--rdp-cell-size);height:100%;height:var(--rdp-cell-size);padding:0;text-align:center}.rdp-weeknumber{font-size:.75em}.rdp-weeknumber,.rdp-day{display:flex;overflow:hidden;align-items:center;justify-content:center;box-sizing:border-box;width:var(--rdp-cell-size);max-width:var(--rdp-cell-size);height:var(--rdp-cell-size);margin:0;border:2px solid transparent;border-radius:100%}.rdp-day_today:not(.rdp-day_outside){font-weight:700}.rdp-day_selected,.rdp-day_selected:focus-visible,.rdp-day_selected:hover{color:var(--rdp-selected-color);opacity:1;background-color:var(--rdp-accent-color)}.rdp-day_outside{opacity:.5}.rdp-day_selected:focus-visible{outline:var(--rdp-outline);outline-offset:2px;z-index:1}.rdp:not([dir=rtl]) .rdp-day_range_start:not(.rdp-day_range_end){border-top-right-radius:0;border-bottom-right-radius:0}.rdp:not([dir=rtl]) .rdp-day_range_end:not(.rdp-day_range_start){border-top-left-radius:0;border-bottom-left-radius:0}.rdp[dir=rtl] .rdp-day_range_start:not(.rdp-day_range_end){border-top-left-radius:0;border-bottom-left-radius:0}.rdp[dir=rtl] .rdp-day_range_end:not(.rdp-day_range_start){border-top-right-radius:0;border-bottom-right-radius:0}.rdp-day_range_end.rdp-day_range_start{border-radius:100%}.rdp-day_range_middle{border-radius:0}
|