bhl-forms 0.0.67 → 0.0.68
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/bhl-forms.es.js
CHANGED
|
@@ -11046,11 +11046,13 @@ function analyticsEvent(event, body) {
|
|
|
11046
11046
|
"google-tag-manager": false
|
|
11047
11047
|
}
|
|
11048
11048
|
});
|
|
11049
|
+
return true;
|
|
11049
11050
|
} catch (err) {
|
|
11050
11051
|
const msg = "failed to fire event: " + err.toString();
|
|
11051
11052
|
console.warn(msg);
|
|
11052
11053
|
rollbar("warning", msg);
|
|
11053
11054
|
}
|
|
11055
|
+
return false;
|
|
11054
11056
|
}
|
|
11055
11057
|
function cookie(name, value, ttl, path, samesite, secure, domain) {
|
|
11056
11058
|
name = name.replace(/\s/g, "_");
|
|
@@ -11208,6 +11210,7 @@ const fireStepEvent = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
|
|
|
11208
11210
|
}
|
|
11209
11211
|
};
|
|
11210
11212
|
const experimentCallback = (form2, variant, fromCache) => {
|
|
11213
|
+
dbg("default experimentCallback", form2, variant, fromCache);
|
|
11211
11214
|
try {
|
|
11212
11215
|
var body = {
|
|
11213
11216
|
"experiment": form2.experiment.name,
|
|
@@ -11216,7 +11219,8 @@ const experimentCallback = (form2, variant, fromCache) => {
|
|
|
11216
11219
|
"no_cache": form2.noCache,
|
|
11217
11220
|
"from_cache": fromCache
|
|
11218
11221
|
};
|
|
11219
|
-
analyticsEvent("form-experiment", body);
|
|
11222
|
+
const res = analyticsEvent("form-experiment", body);
|
|
11223
|
+
dbg("experimentCallback event", res);
|
|
11220
11224
|
} catch (err) {
|
|
11221
11225
|
const msg = "failed to fire experiment callback: " + err.toString();
|
|
11222
11226
|
console.warn(msg);
|
|
@@ -15623,6 +15627,7 @@ const init = () => {
|
|
|
15623
15627
|
const res = chooseVariant(form2.experiment);
|
|
15624
15628
|
schema = res.variant.schema;
|
|
15625
15629
|
if (form2.experimentCallback) {
|
|
15630
|
+
dbg("form.experimentCallback", form2.experimentCallback);
|
|
15626
15631
|
if (form2.experimentCallback === true) {
|
|
15627
15632
|
experimentCallback(form2, res.variant, res.fromCache);
|
|
15628
15633
|
} else {
|