Skip to content

Added FAQ Section Including Common Question/Answer Regarding Timestamp Discrepancies #6980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/connections/spec/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,3 +298,25 @@ Segment calculates `timestamp` as `timestamp = receivedAt - (sentAt - originalTi

> info ""
> 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.
>

## FAQ

### Why Are Events Received with Timestamps Set in the Past or Future?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Why Are Events Received with Timestamps Set in the Past or Future?
### Why are events received with timestamps set in the past or future?


If you're using one of Segment's client-side libraries, please note that several factors can cause timestamp discrepancies in your event data.

1. **Overriding Timestamp Value:**
- 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.

2. **Analytics.js Source with Retries Enabled:**
- 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.

3. **Mobile App Backgrounded or Closed:**
- 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.

4. **Inaccurate Browser/Device Clock Settings:**
- 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.

5. **Traffic from Internet Bots:**
- [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.
Comment on lines +309 to +322
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. **Overriding Timestamp Value:**
- 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.
2. **Analytics.js Source with Retries Enabled:**
- 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.
3. **Mobile App Backgrounded or Closed:**
- 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.
4. **Inaccurate Browser/Device Clock Settings:**
- 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.
5. **Traffic from Internet Bots:**
- [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.
* **Overriding Timestamp Value:** 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.
* **Analytics.js Source with Retries Enabled:** The [Retries](/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.
* **Mobile App Backgrounded or Closed:** If a user closes the app, events may be queued within the app. These queued events won't send until the app is re-opened, potentially in the future, leading to timestamp discrepancies.
* **Inaccurate Browser/Device Clock Settings:** 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.
* **Traffic from Internet Bots:** [Internet Bots](/docs/guides/ignore-bots/#whats-a-bot) can sometimes send requests with unusual timestamps, either intentionally or due to incorrect settings, leading to discrepancies.

Loading