Skip to main content

Our team is trying to understand how our events interact with the Identify API over time. 

 

We understand that the identify API intercepts events from the given image in the doc:


What we’d like to understand is the sync user properties step works, specifically how the Identify API handles user properties for events that we backfill.

Imagine the following scenario for a given user (all times in universal standard time): 
1. at 4PM 01/01/2024 : We send Event A for User 1: `{ time: 4PM 01/01/2024  }`
2. at 5PM 01/01/2024 : We set the Identity for User 1 `{ foo: “Bar” }`
3. at 6PM 01/01/2024 : We send Event B for User 1: `{ time: 4PM 01/01/2024 (BEFORE we set the identity)  }`
4. at 7PM 01/01/2024 : We send Event C for User 1: `{ time: 7PM 01/01/2024 (AFTER we set the identity)  }`

Our goal is that Event A and Event B should NOT have a user property `foo: “Bar”` set for the user, and Event C should.


From the documentation here, We think this second sentence may be incomplete (there is no following ‘or’ in the ‘either’ statement), which makes it hard to answer our question:

The user properties displayed with each event in a user's individual event stream capture the value of the user property at the time of the event. This information is derived from either the most recent event sent via an Identify call.


Has anyone else attempted this? If so, what is the behavior people have seen and what should we expect? 

Is there a way to call the Identify API with a timestamp similar to the `time` parameter with how the Event API works? 

Hi Andrew!

Hope you're having a fantastic day!

Ben here! I completely agree with your statement:

In your scenario, Event A and Event B would not have the user property `foo: 'Bar'` because they occurred before the Identify call was made. Event C, which occurred after the Identify call, would have the user property `foo: 'Bar'`.

I also think this sentence would make more sense:


> This information is derived from either the most recent event sent **OR** via an Identify call.


Regarding your question about calling the Identify API with a timestamp, the Identify API does not currently support a timestamp parameter like the Event API does. The Identify API updates user properties based on the server upload time, not the timestamp of the event.

For more details, you can check out these articles:


- Overview of user properties and event properties in Amplitude
- Identify API

Best regards,

Ben


P.S. Checkout upcoming events and user meetups on our events page.

Reply