Skip to main content

What we're trying to build is the following:

When we detect an add-to-cart or a product-view through our server-side tracking, but we don't have an e-mailadres yet and the client-side klaviyo has also been unable to identify the profile we want to store this event in our database. Then, when we eventually figure out the e-mailadres of the customer, we want to send those add-to-carts and product-views that we were unable to identify earlier to Klaviyo with the later-discovered e-mailadres.

Now for my question, will using the "Create event' endpoint with just the email in the profile part of the body be enough to make Klaviyo recognize the profile and add it to the appropriate flows, or create a new profile if it wasn't identified earlier? and ofcourse we could also provide the _kx if we somehow got our hands on that at a later date (not during the original event). Or will we have to manually use some other endpoint that i'm missing to identify the user first?

 

And another question:

If i do have a _kx, would it be best to not send any other profile identifiers? I can imagine that sending an e-mailaders might be bad since there is a slight chance that the emailadresses won't match, not sure how Klaviyo would deal with that scenario.

Hey @SelcuKTekin 

I am not entirely sure about this, however feel free to chat with klaviyo support to confirm this,

using the "Create Event" endpoint with just the email in the profile part of the body should be enough for Klaviyo to recognize the profile and associate the event with that profile. If the email corresponds to an existing profile, the event will be added to it. If there is no profile with that email yet, Klaviyo will automatically create a new profile. This will also allow the user to enter the appropriate flows if they are triggered by events like "add-to-cart" or "Viewed Product" metric.

You only need to include the email in the request body to identify the profile, as Klaviyo primarily uses email as a unique identifier.

If you have the _kx (the cookie value), this can help Klaviyo identify the profile more accurately. When sending an event with the _kx, Klaviyo will match the event to the corresponding profile even if the email address isn't yet known.

If you later acquire the email address, you can send it with the _kx to update the profile.

Important: If you send an event with both _kx and an email, there’s a chance of mismatch if the email is wrong or different from the one associated with the _kx. Klaviyo may handle this by treating the event as two separate profiles.

When you have the _kx cookie, it’s usually best to avoid sending other profile identifiers like email if you're uncertain whether the email matches the original profile.

I hope this helps and thank you for sharing your question with us here in the community,

Cheers

Arpit


Thank you @ArpitBanjara 

This is how I expected things to work but I just wanted to make sure before we started working on the implentation, your in-depth answer is greatly appreciated!

Have a nice day :)

Kind regards,

Selcuk Tekin


Reply