Skip to content

Commit 3dede91

Browse files
authored
Merge pull request #6980 from segmentio/prigiattiperrut-patch-4
Added FAQ Section Including Common Question/Answer Regarding Timestamp Discrepancies
2 parents a7c159a + 74f86e8 commit 3dede91

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/connections/spec/common.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,3 +298,25 @@ Segment calculates `timestamp` as `timestamp = receivedAt - (sentAt - originalTi
298298

299299
> info ""
300300
> For client-side tracking it's possible for the client to spoof the `originalTimeStamp`, which may result in a calculated `timestamp` value set in the future.
301+
>
302+
303+
## FAQ
304+
305+
### Why Are Events Received with Timestamps Set in the Past or Future?
306+
307+
If you're using one of Segment's client-side libraries, please note that several factors can cause timestamp discrepancies in your event data.
308+
309+
1. **Overriding Timestamp Value:**
310+
- When a manual timestamp is set in the payload with a date in the past, it can cause events to appear as if they were sent earlier than they actually were.
311+
312+
2. **Analytics.js Source with Retries Enabled:**
313+
- The [Retries](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#retries) feature supports offline traffic by queuing events in Analytics.js. These events are sent or retried later when an internet connection is available, keeping the original timestamp intact.
314+
315+
3. **Mobile App Backgrounded or Closed:**
316+
- If a user closes the app, events may be queued within the app. These queued events won't be sent until the app is re-opened, potentially in the future, leading to timestamp discrepancies.
317+
318+
4. **Inaccurate Browser/Device Clock Settings:**
319+
- Timestamps can be incorrect if the client's device time is inaccurate, as the `originalTimestamp` relies on the client device's clock, which can be manually adjusted.
320+
321+
5. **Traffic from Internet Bots:**
322+
- [Internet Bots](https://segment.com/docs/guides/ignore-bots/#whats-a-bot) can sometimes send requests with unusual timestamps, either intentionally or due to incorrect settings, leading to discrepancies.

0 commit comments

Comments
 (0)