Skip to main content
Solved

How does Amplitude deal with persisted user properties with regard to sessions?

  • January 12, 2022
  • 1 reply
  • 451 views

We’re currently moving from a Node SDK solution to a Javascript SDK and have some questions about how user properties and sessions interact.

  • The client sends an $identify event to persist user properties.
  • Events have a sequence id which tracks the sequence of events.
  • If the $identify event is received out of order, will all events that occurred on the client after the $identify event have the correct data? i.e have a higher sequence id
  • If events came in from an older session, would they have the user properties set within that session or would they use current user properties set from the most recent session?

Best answer by Denis Holmes

Hi @ramblingenzyme,

Thanks for writing in to the community! Good to see it being so active!

  • The client sends an $identify event to persist user properties.
  • Events have a sequence ID which tracks the sequence of events.
  • If the $identify event is received out of order, will all events that occurred on the client after the $identify event have the correct data? i.e have a higher sequence id
  • If events came in from an older session, would they have the user properties set within that session or would they use current user properties set from the most recent session?


The event is determined from the client upload time. So the identity event will be determined from when the client triggered the event so it will stay chronological from when the user triggered the events. So the identify event should still work as expected as long as it is triggered before the events that follow it. 

If you upload events for an older session, they will have the user and event properties that are with the event at the time it is sent. This is for all events. However, do you mean if the event is not uploaded (but happened) until later, then the event should have the user and event properties pertaining to the user at that time.

I hope that helps! Let me know if I can help in any other way.

Kind Regards,
Denis

View original
Did this topic help you find an answer to your question?

1 reply

Denis Holmes
Team Member
Forum|alt.badge.img+8
  • Team Member
  • 448 replies
  • Answer
  • January 13, 2022

Hi @ramblingenzyme,

Thanks for writing in to the community! Good to see it being so active!

  • The client sends an $identify event to persist user properties.
  • Events have a sequence ID which tracks the sequence of events.
  • If the $identify event is received out of order, will all events that occurred on the client after the $identify event have the correct data? i.e have a higher sequence id
  • If events came in from an older session, would they have the user properties set within that session or would they use current user properties set from the most recent session?


The event is determined from the client upload time. So the identity event will be determined from when the client triggered the event so it will stay chronological from when the user triggered the events. So the identify event should still work as expected as long as it is triggered before the events that follow it. 

If you upload events for an older session, they will have the user and event properties that are with the event at the time it is sent. This is for all events. However, do you mean if the event is not uploaded (but happened) until later, then the event should have the user and event properties pertaining to the user at that time.

I hope that helps! Let me know if I can help in any other way.

Kind Regards,
Denis


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings