---
title: "Get visits and revenue by source"
method: GET
path: "/v3/web-analytics/source-revenue"
tags: ["Web Analytics"]
---

# Get visits and revenue by source

`GET /v3/web-analytics/source-revenue`

Dates and filters select an originating page-view cohort. Visit attribution is first_touch; checkout attribution and linked paid-order earnings are last_touch, including later payments within retained history. Amounts use payment snapshots with historical current-order fallback, are grouped by currency, and can be unavailable. More than 100,000 linked paid orders returns 400; narrow the date range. Requires web_analytics:read. The authenticated credential determines the business; no business_id override is accepted. Reporting and scope-option calls share a 600-request/hour limit per API key or OAuth installation, in addition to the normal burst and hourly limits. Responses contain recorded analytics, which may be lower than actual traffic because of consent choices, self-traffic exclusion, blockers, and unavailable attribution.

## Query parameters

- `from` string, date, required
- `to` string, date, required
- `timezone` string
- `store_id` integer
- `entity_type` 'landing_page' | 'product' | 'bundle_price_option' | 'store_home' | 'cart' | 'checkout' | 'payment_link' | 'order_detail' | 'order_success' | 'order_invoice' — Customer-facing page surface. The owner is a landing page, product, bundle price option, store, or protected payment-link scope; order surfaces use the store owner, never an order ID.
- `entity_id` string
- `entity_path` string
- `page_id` integer
- `page_host` string
- `page_path` string
- `ad_click` 'paid' | 'organic' | 'meta' | 'google' | 'tiktok'
- `limit` integer
- `utm_type` 'source' | 'medium' | 'campaign' | 'content' | 'term'

## Response `200`

Success

- WebAnalyticsSourceRevenue — The selected page-view dates define the cohort; subsequent linked order creation and payment may update its earnings through report time within retained history. first_touch and last_touch are different attribution observations and need not have identical rows or totals.
  - `utm_type` 'source' | 'medium' | 'campaign' | 'content' | 'term', required
  - `first_touch` WebAnalyticsSource[], required — Visit attribution for the selected page-view cohort.
    - `utm_type` 'source' | 'medium' | 'campaign' | 'content' | 'term', required
    - `bucket_kind` 'direct' | 'label' | 'unknown', required — Use bucket_kind together with the exact value to identify a bucket. A literal label named Direct or Unknown is distinct from the special direct or unknown bucket.
    - `value` string, required — Decoded attribution label, empty for direct, or Unknown for unresolved labels.
    - `traffic_status` 'available' | 'unavailable', required
    - `revenue_status` 'available' | 'unavailable', required
    - `views` integer, nullable, required
    - `visitors` integer, nullable, required
    - `sessions` integer, nullable, required
    - `attribution` 'first_touch', required
  - `last_touch` WebAnalyticsRevenue[], required — Checkout attribution and earnings for paid orders linked to that cohort. Rows are separated by currency; this is not all business revenue.
    - `bucket_kind` 'direct' | 'label' | 'unknown', required — Use bucket_kind together with the exact value to identify a bucket. A literal label named Direct or Unknown is distinct from the special direct or unknown bucket.
    - `value` string, required — Decoded checkout attribution label, empty for direct, or Unknown when unavailable.
    - `traffic_status` 'available' | 'unavailable', required
    - `revenue_status` 'available' | 'unavailable', required
    - `orders` integer, nullable, required — Distinct linked paid orders in this attribution/currency bucket.
    - `currency` string, nullable, required — Currency for this revenue bucket. Never add money across different currencies.
    - `gross_revenue` string, nullable, required — Decimal amount. Null if attribution or any required revenue amount is unavailable.
    - `net_revenue` string, nullable, required — Decimal amount. Null if attribution or any required revenue amount is unavailable.
    - `snapshot_orders` integer, nullable, required — Orders valued from their first recorded payment snapshot.
    - `fallback_orders` integer, nullable, required — Historical orders valued from current order data because no usable snapshot was recorded.
    - `missing_revenue_orders` integer, nullable, required — Orders with neither usable snapshot nor current-order values.
    - `attribution` 'last_touch', required
  - `last_touch_scope` WebAnalyticsRevenueScope, required
    - `status` 'available', required
    - `applied_filters` string[], required
    - `unsupported_filters` string[], required
    - `basis` 'page_view_cohort', required
    - `linked_order_counts_only` true, required
    - `revenue_basis` 'payment_snapshot_with_order_fallback', required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `429` — Too Many Requests. Storefront public requests using `X-Scalev-Storefront-Api-Key` or `X-Scalev-Guest-Token` are rate-limited as direct client/browser requests. Machine-authenticated business requests are rate-limited per API key or OAuth installation. Rate-limit responses may be plain text instead of the normal JSON error shape.

## Changes

- **2026-09-20** `af4231e0cad9` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/scalev/apis/nexus-commerce-api/changes/v3/web-analytics/source-revenue/get.md)

---

[API](https://skmtc.dev/scalev/apis/nexus-commerce-api.md) · [All operations](https://skmtc.dev/scalev/apis/nexus-commerce-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scalev/apis/nexus-commerce-api/revisions/215156c4eee0?raw)
