klaviyo / magento2-klaviyo

37 stars 51 forks source link

Rebuild cart for Logged-in users, whitelist klaviyo scripts, identify logged in users correctly #155

Closed siddwarkhedkar closed 2 years ago

siddwarkhedkar commented 2 years ago

This PR fixes a few things:

MaskedQuoteId is not generated for quotes associated with Logged in users. In such a situation, we would send a null back with the ATC payload, with no way to rebuild cart for these users. TP

There was a lot of noise in the console caused by csp policies not whitelising the klaviyo scripts TP

Logged in users were not correctly being cookied as the customerData was being generated after script. It will now wait for this to be generated before trying to cookie the user.