Skip to main content
Solved

Tracking Events (Javascript) use previous 'customer_properties'

  • September 4, 2021
  • 1 reply
  • 172 views

Forum|alt.badge.img+2

I use Tracking Events (Javascript) and now it uses previous 'customer_properties' and tracked events for previous profiles.

Before sometime it’s working fine and tracked events for the just identified profile but now it’s uses previous ‘customer_properties’.

 

My JS logic is as follows:

_learnq.push(['identify', {  '$email': email,  '$first_name': firstName,  '$last_name': lastName}]);_learnq.push(['track', 'event1', {  "FirstName" : firstName,  "LastName" : lastName,  "Comment" : comments}]);
_learnq.push(['identify', {  '$email': email1,  '$first_name': firstName1,  '$last_name': lastName1}]);_learnq.push(['track', 'event2', {  "FirstName" : firstName1,  "LastName" : lastName1,  "Comment" : comments1}]);

Best answer by Dov

Hi @Sourabh_Jain,

Thanks for sharing this with the Klaviyo community.

The $email field is the unique identifier for the user. If you want to lookup the contact, or update something on the contact's profile using the Track or Identify API, you reference this unique identifier. It is not necessary to use the other fields in the call. If you are having any further difficulty making the track call, I recommend checking out the thread below for some solutions.

 

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • Answer
  • September 7, 2021

Hi @Sourabh_Jain,

Thanks for sharing this with the Klaviyo community.

The $email field is the unique identifier for the user. If you want to lookup the contact, or update something on the contact's profile using the Track or Identify API, you reference this unique identifier. It is not necessary to use the other fields in the call. If you are having any further difficulty making the track call, I recommend checking out the thread below for some solutions.