Skip to main content
Solved

Activity Id and Unique on events?

  • May 1, 2024
  • 4 replies
  • 171 views

Forum|alt.badge.img+5
  • Problem Solver III
  • 39 replies

Hi, 

 

I am wondering how the Activity Id and Unique ID on events is calculated?

Cheers

 

Chris 

Best answer by saulblum

Hey Saulblum, 

 

Thanks for your reply. 

 

Correct, I can set the unique_id myself, I guess i was wondering how the value was created, was it based on a timestamp + useragent?

If you don’t explicitly set the event’s unique ID, it’s just a UNIX time stamp.

4 replies

Forum|alt.badge.img+7
  • Klaviyo Employee
  • 182 replies
  • May 1, 2024

https://developers.klaviyo.com/en/reference/create_event

You can explictly set the event’s unique ID when creating an event; else, it’ll default to a timestamp.

unique_id

string

A unique identifier for an event. If the unique_id is repeated for the same
profile and metric, only the first processed event will be recorded. If this is not
present, this will use the time to the second. Using the default, this limits only one
event per profile per second.

Unique ID is also used in events like Canceled Order, to match the event back to the original order, for CLV calculations.


Forum|alt.badge.img+5
  • Author
  • Problem Solver III
  • 39 replies
  • May 1, 2024

Hey Saulblum, 

 

Thanks for your reply. 

 

Correct, I can set the unique_id myself, I guess i was wondering how the value was created, was it based on a timestamp + useragent?


Forum|alt.badge.img+7
  • Klaviyo Employee
  • 182 replies
  • Answer
  • May 2, 2024

Hey Saulblum, 

 

Thanks for your reply. 

 

Correct, I can set the unique_id myself, I guess i was wondering how the value was created, was it based on a timestamp + useragent?

If you don’t explicitly set the event’s unique ID, it’s just a UNIX time stamp.


Forum|alt.badge.img+5
  • Author
  • Problem Solver III
  • 39 replies
  • May 15, 2024

Hey Saulblum, 

 

Thanks for your reply. 

 

Correct, I can set the unique_id myself, I guess i was wondering how the value was created, was it based on a timestamp + useragent?

If you don’t explicitly set the event’s unique ID, it’s just a UNIX time stamp.


thanks, understood!