Solved

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

  • 12 January 2022
  • 1 reply
  • 223 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?
icon

Best answer by Denis Holmes 13 January 2022, 09:48

View original

1 reply

Userlevel 6
Badge +8

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