---
title: Bundle events and visitors
slug: experimentation-strategy/data-docs/bundle-events-and-visitors
docTags: 
createdAt: 2026-08-05T20:34:50.000Z
---

The following examples include the optional `client_name` and `client_version` fields. Include these fields for debugging. For information, see the [Event API reference](docId\:LHIwyTMwVE6kNISdESDTw).

:::hint{type="danger"}
A single JSON object must be **3.5 MB** or less.
:::

## Bundle events

The following example shows a visitor who was exposed to a variation and performed a tracked action on the site:

:::hint{type="info"}
The order of the events in the `events` array is not important.
:::

```json
{
  "account_id": "1887578053",
  "project_id": "7205579439",
  "visitors": [
    {
      "session_id": "",
      "visitor_id": "test_user",
      "snapshots": [
        {
          "decisions": [],
          "events": [
            {
              "key": "4841578001_view_optimizely_dev_docs",
              "entity_id": "4841578001",
              "revenue": 100,
              "timestamp": 1491519130344,
              "uuid": "145a44a2-6320-48d6-80d6-bff20b32cd65"
            },
            {
              "key": "8766076075_click_view_docs",
              "entity_id": "8766076075",
              "revenue": 400,
              "timestamp": 1491519130352,
              "uuid": "3bb9371d-c245-4bf8-8086-5fef9f60cd06"
            }
          ]
        }
      ]
    }
  ],
  "anonymize_ip": true,
  "client_name": "Optimizely/event-api-demo",
  "client_version": "1.0.0",
  "enrich_decisions": true
}
```

## Bundle visitors

The following example shows two visitors bundled in the same request. The second visitor is exposed to a different variation of the same campaign and experiment, and performs one of the same tracked actions.

```json
{
  "account_id": "1887578053",
  "project_id": "7205579439",
  "visitors": [
    {
      "session_id": "",
      "visitor_id": "test_user",
      "snapshots": [
          {
          "decisions": [],
          "events": [
            {
              "key": "4841578001_view_optimizely_dev_docs",
              "entity_id": "4841578001",
              "revenue": 100,
              "timestamp": 1491519130344,
              "uuid": "145a44a2-6320-48d6-80d6-bff20b32cd65"
            },
            {
              "key": "8766076075_click_view_docs",
              "entity_id": "8766076075",
              "revenue": 400,
              "timestamp": 1491519130352,
              "uuid": "3bb9371d-c245-4bf8-8086-5fef9f60cd06"
            }
          ]
        }
      ]
    },
    {
      "session_id": "",
      "visitor_id": "another_test_user",
      "snapshots": [
        {
          "decisions": [],
          "events": [
            {
              "key": "4841578001_view_optimizely_dev_docs",
              "entity_id": "4841578001",
              "revenue": 400,
              "timestamp": 1491519130362,
              "uuid": "899de30f-fa1b-440c-b8a8-75a18da104a2"
            }
          ]
        }
      ]
    }
  ],
  "anonymize_ip": true,
  "client_name": "Optimizely/event-api-demo",
  "client_version": "1.0.0",
  "enrich_decisions": true
}
```
