> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abconvert.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Storewide Analytics — ABConvert API

> Query storewide visitor analytics across your entire store for a given experiment, measuring impact beyond the tested products using v1 and v2 endpoints.

<Note>
  **Preview — this page is an early draft.** We're still verifying the API reference against the current endpoints. Fields, response shapes, and examples may change before this section is marked stable. Follow [PRO-1459](https://linear.app/abconvert/issue/PRO-1459) or ask in `#abconvert-dev` if you're integrating against this today.
</Note>

Storewide analytics measure the impact of an experiment on your whole store, not just the products directly enrolled in the test. This lets you detect revenue cannibalization (where a variant wins on the test product but loses revenue elsewhere) or spillover lift (where winning variants also improve behavior on related products).

Both storewide analytics endpoints are session endpoints and require Shopify authentication. They accept the same standard request body as the [per-experiment analytics endpoints](/api-reference/analytics/experiment).

***

## Storewide analytics vs. per-experiment analytics

| Dimension        | Per-experiment analytics                    | Storewide analytics                           |
| ---------------- | ------------------------------------------- | --------------------------------------------- |
| Scope            | Only products enrolled in the experiment    | Your entire store catalog                     |
| Use case         | Measure direct test impact                  | Detect cannibalization or spillover           |
| Attribution      | Events tied to specific experiment products | All store events during the experiment window |
| Visitor counting | Experiment participants only                | All store visitors during the period          |

<Note>
  Storewide analytics still require an `experimentId` to define the visitor groups. ABConvert uses the experiment's test group assignments to segment storewide behavior — it does not compare random store visitors.
</Note>

***

## Storewide analytics v1

Returns storewide conversion metrics broken down by the experiment's test groups, using the same visitor-based methodology as per-experiment analytics v1.

```
POST /api/analytics/v1/storewide/:experimentId
```

### Path parameters

<ParamField path="experimentId" type="string" required>
  The `_id` of the experiment whose visitor groups you want to use for segmentation.
</ParamField>

### Request body

Accepts the standard analytics request body:

```json theme={null}
{
  "dateStart": "2024-01-01T00:00:00.000Z",
  "dateFinish": "2024-01-31T23:59:59.999Z",
  "filterParams": {
    "countries": ["US", "CA"]
  },
  "deviceType": "ALL",
  "visitorType": "ALL"
}
```

See the [standard analytics request fields](/api-reference/analytics/experiment#standard-analytics-request) for full parameter documentation.

### Example request

```bash theme={null}
curl -X POST "https://app.abconvert.io/api/analytics/v1/storewide/64a1f2b3c4d5e6f7a8b9c0d1" \
  -H "Authorization: Bearer <shopi...en>" \
  -H "Content-Type: application/json" \
  -d '{
    "dateStart": "2024-01-01T00:00:00.000Z",
    "dateFinish": "2024-01-31T23:59:59.999Z",
    "filterParams": { "countries": ["US", "CA"] },
    "deviceType": "ALL",
    "visitorType": "ALL"
  }'
```

### Response

```json theme={null}
{
  "totalViews": [4200, 4150],
  "totalAddToCarts": [890, 920],
  "totalOrders": [310, 330],
  "totalRevenue": [31000.00, 34200.00],
  "statisticalSignificance": {
    "pValue": 0.061,
    "tStat": 1.88,
    "confidenceInterval": [-0.01, 0.09]
  }
}
```

<ResponseField name="totalViews" type="array">
  Total store page views per test group across all products during the period.
</ResponseField>

<ResponseField name="totalAddToCarts" type="array">
  Total add-to-cart events per test group across the whole store.
</ResponseField>

<ResponseField name="totalOrders" type="array">
  Total completed orders per test group across the whole store.
</ResponseField>

<ResponseField name="totalRevenue" type="array">
  Total revenue in store currency per test group, across all products.
</ResponseField>

<ResponseField name="statisticalSignificance" type="object">
  Statistical significance metrics for the storewide conversion difference. See [experiment analytics](/api-reference/analytics/experiment#visitor-based-analytics-v1) for field definitions.
</ResponseField>

***

## Storewide analytics v2

An enhanced version of storewide analytics that includes visitor journey tracking across multiple sessions, matching the richer attribution model of per-experiment analytics v2.

```
POST /api/analytics/v2/storewide/:experimentId
```

### Path parameters

<ParamField path="experimentId" type="string" required>
  The `_id` of the experiment whose visitor groups define the segmentation.
</ParamField>

### Request body

Same structure as v1. See the [standard analytics request fields](/api-reference/analytics/experiment#standard-analytics-request).

### Example request

```bash theme={null}
curl -X POST "https://app.abconvert.io/api/analytics/v2/storewide/64a1f2b3c4d5e6f7a8b9c0d1" \
  -H "Authorization: Bearer <shopi...en>" \
  -H "Content-Type: application/json" \
  -d '{
    "dateStart": "2024-01-01T00:00:00.000Z",
    "dateFinish": "2024-01-31T23:59:59.999Z",
    "deviceType": "ALL",
    "visitorType": "ALL"
  }'
```

The response extends the v1 shape with additional journey-level breakdown fields, reflecting how experiment participants behaved across your entire store over multiple sessions.

***

## Specialized experiment analytics

For experiment types other than price and content, ABConvert provides dedicated analytics endpoints that return type-appropriate metrics:

| Experiment type | Endpoint                                     |
| --------------- | -------------------------------------------- |
| Shipping        | `POST /api/analytics/shipping/:experimentId` |
| URL redirect    | `POST /api/analytics/redirect/:experimentId` |
| Template        | `POST /api/analytics/template/:experimentId` |
| Theme           | `POST /api/analytics/theme/:experimentId`    |
| Checkout UI     | `POST /api/analytics/checkout/:experimentId` |

All specialized endpoints accept the same standard request body.
