Issue
Some of your events are failing to ingest or are intermittently dropping in Segment without throwing an explicit error in your client application. When reviewing your Segment source logs, you observe that certain event payloads fail to ingest.
Product
Segment
Environment
Segment Console
Cause
Segment requires every event payload to include either an anonymous_id or a user_id defined at the top level of the JSON object. If your system nests these properties inside child objects (for example, as user.id or triggered_by.user_id), Segment cannot identify the user and drops the event during ingestion.
Additional common reasons for dropped events in Segment include:
- Exceeding payload size limits
- Missing or empty event names
- Deduplication caused by duplicate
messageIdvalues
Resolution
To ensure your events are processed and ingested successfully, update your event payloads to comply with Segment requirements:
- Locate a failed event in your application logs.
- Verify if
user_idoranonymous_idis nested inside a sub-object rather than placed at the top level. - Modify your payload structure to include either
user_idoranonymous_idat the root level of the JSON payload. - Confirm that the payload includes a valid event name, stays within payload size limits, and uses a unique
messageIdif specified. - Resend the event to Segment and monitor the source logs to confirm successful ingestion.