Skip to content

Commit

Permalink
Merge pull request #23 from bagedevimo/dont-use-cookie-if-not-asked
Browse files Browse the repository at this point in the history
Don't retrieve and use email from cookie if storing not enabled
  • Loading branch information
Bukashk0zzz authored Oct 9, 2024
2 parents eae1d59 + df30e66 commit c233500
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion template.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function getCustomerProperties() {

if (data.email) customerProperties.email = data.email;
else if (eventData.email) customerProperties.email = eventData.email;
else {
else if (data.storeEmail) {
let emailCookie = getCookieValues('stape_klaviyo_email');
if (emailCookie.length) customerProperties.email = emailCookie[0];
}
Expand Down
2 changes: 1 addition & 1 deletion template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ function getCustomerProperties() {

if (data.email) customerProperties.email = data.email;
else if (eventData.email) customerProperties.email = eventData.email;
else {
else if (data.storeEmail) {
let emailCookie = getCookieValues('stape_klaviyo_email');
if (emailCookie.length) customerProperties.email = emailCookie[0];
}
Expand Down

0 comments on commit c233500

Please sign in to comment.