Skip to content

Commit a55bf64

Browse files
authored
Merge pull request #24 from klaviyo/fix/mews-match-cloudbeds-reidentify
Fix Mews to match Cloudbeds re-identification behavior
2 parents eb08bfc + d274f4e commit a55bf64

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

public/klaviyo_hotel_tracking_mews.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,9 @@
468468
const isEmailField = input.type === "email" || input.name === "email" || input.id === "email" || input.getAttribute("data-test-id") === "checkout-field-email" || input.getAttribute("autocomplete") === "email";
469469
const isPhoneField = input.type === "tel" || input.name === "phone" || input.name === "phoneNumber" || input.id === "phone" || input.getAttribute("data-test-id") === "checkout-field-phone" || input.getAttribute("autocomplete") === "tel";
470470
if (isEmailField) {
471-
debugLog("Email field detected, attempting re-identification");
471+
debugLog("Email field detected, attempting identification");
472472
setTimeout(function() {
473-
attemptIdentify("email blur", true);
473+
attemptIdentify("email blur");
474474
}, 500);
475475
} else if (isPhoneField) {
476476
debugLog("Phone field detected, attempting re-identification");

src/mews/generalUtils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ function attachFormListeners(guestForm) {
159159

160160
// Only identify/re-identify on email or phone blur
161161
if (isEmailField) {
162-
debugLog('Email field detected, attempting re-identification');
163-
setTimeout(function() { attemptIdentify('email blur', true); }, 500);
162+
debugLog('Email field detected, attempting identification');
163+
setTimeout(function() { attemptIdentify('email blur'); }, 500);
164164
} else if (isPhoneField) {
165165
debugLog('Phone field detected, attempting re-identification');
166166
setTimeout(function() { attemptIdentify('phone blur', true); }, 500);

0 commit comments

Comments
 (0)