You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of this, manually setting timestamp_unixtime_ms in an event has no effect.
Suggested changes
The issue I have is that it's not possible to get a "ground truth" timestamp for when the event hit the server. If the user's system clock is off, then the timestamps will be off. To support this, it would be nice to have either
A config option for using client-based timestamps, or
The ability to manually set the timestamp_unixtime_ms value to null or undefined to ensure it's not overwritten by the SDK.
Thanks in advance for taking a look!
The text was updated successfully, but these errors were encountered:
Motivation
When working with the web SDK, it would be nice to allow the server to set the timestamps for the events. Based on the mParticle docs:
However, this is not currently possible with the web sdk.
Current State
From my understanding, as of now the event timestamps are set as follows in
src/serverModel.ts
:First, the
dateLastEventSent
is set vianew Date()
(link):Then, the event timestamp is set using this value (link):
Because of this, manually setting
timestamp_unixtime_ms
in an event has no effect.Suggested changes
The issue I have is that it's not possible to get a "ground truth" timestamp for when the event hit the server. If the user's system clock is off, then the timestamps will be off. To support this, it would be nice to have either
timestamp_unixtime_ms
value tonull
orundefined
to ensure it's not overwritten by the SDK.Thanks in advance for taking a look!
The text was updated successfully, but these errors were encountered: