---
title: "Missing insert_id or session_id: confirm the problem"
description: Inspect representative server and client events for the deduplication and session identifiers that keep counts and sessions accurate.
product: data
token_estimate: 1194
---
# Missing insert_id or session_id: confirm the problem

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

`insert_id` and `session_id` protect event counts and session metrics. `insert_id` lets Amplitude discard duplicate copies of a retried event when the copies have the same `device_id`. This prevents network retries from inflating event counts. `session_id` groups a user's events into a session for Session Analysis. Missing values can cause incorrect counts and session metrics.

Data Assistant doesn't check these fields. Requirements vary by source. Amplitude SDKs manage `session_id` automatically for supported client platforms. Events sent through the HTTP API need an explicit `session_id` to join session metrics. `insert_id` matters most for retried server-side events. Audit representative events to confirm both fields.

Run this audit if event counts seem inflated or Session Analysis results seem incorrect. Also run the audit when you add a server or HTTP API source. You need access to [User Profiles](https://amplitude.com/docs/analytics/user-data-lookup).

![Diagram showing Amplitude storing one copy when a retry has the same device_id and insert_id, versus dropping a second real event when the same device reuses those identifiers within seven days](https://amplitude.com/docs/images/diagrams/insert-id-dedup.svg) ![Diagram showing Amplitude storing one copy when a retry has the same device_id and insert_id, versus dropping a second real event when the same device reuses those identifiers within seven days](https://amplitude.com/docs/images/diagrams/insert-id-dedup.dark.svg)

## Audit representative events

1. List each client SDK, server, and customer data platform source in the project.
2. Choose at least one active test event from each source.
3. Trigger the test event and open the user's profile in _Users > User Profiles_.
4. Select the event, choose **Raw**, and record its source library, `insert_id`, and `session_id`.
5. For server events that your system retries, confirm that each logical event has a non-empty `insert_id`. Retries of the same event must reuse the `insert_id` value. Different events must use different `insert_id` values.
6. For client SDK events that belong to an in-product session, confirm that `session_id` contains a positive session start time. The `session_id` value must remain the same throughout one session.
7. For HTTP API events that should join Session Analysis, confirm that `session_id` isn't missing or `-1`.
8. Confirm that `session_id: -1` is intentional for out-of-session events, such as some push-notification events.

> **Note:** A sample doesn't measure project-wide coverage
>
> User Profiles and Event Explorer support targeted QA. To calculate missing-field rates across every source, ask your data team to query an authorized export or warehouse copy of the raw events.

## How Amplitude handles missing identifiers

Amplitude can't populate `insert_id` or `session_id` after ingestion. You must correct the SDK, server, or CDP mapping. For sessions, Amplitude provides one analysis-layer option. An Admin or Manager can define a [custom session](https://amplitude.com/docs/data/sources/instrument-track-sessions) from another property, from start and end events, or from a timeout. Custom sessions can support Session Analysis without changing every payload. However, custom sessions don't add missing raw `session_id` values. Custom session definitions also affect session-based charts across the whole project.

## Send requirements to the tracking owner

Correcting these fields is an instrumentation change. Send the affected sources to the team that owns your tracking. Copy this message and fill in the brackets:

```text
Some of our events are missing event identifiers. On source [SOURCE], event
[EVENT] arrives with [insert_id missing/duplicated / session_id missing or -1].
For retried server events, send a unique insert_id and reuse it on retries.
For HTTP API events that should join sessions, send session_id as the
session start time in epoch milliseconds. This is [inflating our counts /
breaking Session Analysis].
```

## Get help without engineering resources

You can't add these fields to incoming events yourself. Contact these resources in order:

- Your Amplitude account team or Customer Success Manager.
- A partner or agency that manages your website or app analytics.
- Amplitude Support at [gethelp.amplitude.com](https://gethelp.amplitude.com) for product questions.

To correct the affected sources, continue with the [engineering solution](https://amplitude.com/docs/data/data-assistant-user-solutions/event-identifiers-engineering).

