Skip to Content
fastmon Docs
Visitors

Count the visitors of each list segment

Report an issue

How many visitors each fixed segment of the list holds.

One statement over the visitors grouped the way /visitors groups them, then a sumIf of the visitor weight per segment. A visitor counts with the weight of its loosest kept row, as in the pageview stats. On an unsampled application a chip's count is the row count its click produces, on a sampled one it is the weighted estimate of that count. Under visitor_filters.arrival every chip counts within that arrival.

A scope that collects neither identifier has no visitor grain, the 404 the pageview stats answer too.

Requires: analytics:read, held by every role.

Authorization

headerAuthorizationBearer <fm_… / fmo_…>

API token generated from the fastmon dashboard (Account → API Token) or at organization level (fmo_…, one that outlives its creator). Send as Authorization: Bearer fm_... or paste the full token (including its prefix) into the Authorize dialog.

Path Parameters

org_id*Org Id

An ID, a UUID in lowercase with hyphens.

Formatuuid

Request Body

application/json
  1. body

Request for the visitor segment counts, the same scope the list takes.

time_range*

Time range for the query

filters?

Optional filters

timezone?|

IANA time zone the local hours of filters.hour_of_day are read in, such as Europe/Berlin. The filter requires it. This route buckets nothing, so the zone changes nothing else

sparse_buckets?|

The sparse threshold of the page, the number POST /analytics/sparse-hours derives. With exclude the rows of the thin hours are left out. Without it the route only echoes the number in meta.sparse_buckets

identity?|

Identifier to group visitors by: 'stitch' or 'session'. Null resolves like /visitors, the application's default (stitch preferred).

visitor_filters?

Post-aggregation filters every segment counts within, as on /visitors

Response Body

Successful Response

application/json
  1. response

How many visitors each fixed segment of the visitors list holds.

Every number counts the visitors POST /analytics/visitors would list with that segment's visitor_filters applied, over the same scope, window and dimension filters. On an unsampled application a chip's count is the row count its click produces, on a sampled one it is the weighted estimate of that count. The identity the visitors were grouped by is request.identity.

meta*

Facts about the result

request*

The request as the server resolved it

visitors*Visitors

Every visitor in the window

affected_visitors*Affected Visitors

Visitors with at least one error (min_errors: 1)

slow_visitors*Slow Visitors

Visitors whose average LCP is at or above slow_lcp_threshold_ms

slow_lcp_threshold_ms*Slow Lcp Threshold Ms

The LCP bound slow_visitors was counted against

ordered_visitors?Ordered Visitors

Visitors who reached the success stage through an event, as contains_checkout_stage selects them. Absent under the identity session

checkout_visitors?Checkout Visitors

Visitors who reached the checkout stage through an event, as contains_checkout_stage selects them. Absent under the identity session

error_checkout_visitors?Error Checkout Visitors

Visitors who reached the checkout stage through an event and had at least one error, as contains_checkout_stage: checkout with min_errors: 1 selects them. Absent under the identity session

cart_visitors*Cart Visitors

Visitors with a cart interaction (contains_cart_interaction)

single_page_visitors*Single Page Visitors

Visitors with exactly one pageview (max_page_count: 1)

POST
/organizations/{org_id}/analytics/visitors/segments
Example Request
curl -X POST 'https://api.fastmon.eu/organizations/019d8b65-a109-76c7-9f4a-bda57a7ab21d/analytics/visitors/segments' \  -H 'Content-Type: application/json' \  -d '{  "time_range": {    "from": "2026-04-14T09:50:01Z",    "to": "2026-04-14T09:50:01Z"  }}'
Example Response
{  "meta": {    "execution_time_ms": 0,    "total": 0,    "limit": 0,    "offset": 0,    "has_more": true,    "next_cursor": "string",    "sampling": {      "rate": 0,      "is_sampled": true,      "estimated_metrics": [        "string"      ]    },    "is_identity_mixed": true,    "complete_until": "2026-04-14T09:50:01Z",    "sparse_buckets": {      "min_pageviews": 0,      "excluded_hour_count": 0    }  },  "request": {    "time_range": {      "from": "2026-04-14T09:50:01Z",      "to": "2026-04-14T09:50:01Z"    },    "comparison_time_range": {      "from": "2026-04-14T09:50:01Z",      "to": "2026-04-14T09:50:01Z"    },    "granularity": "minute",    "identity": "stitch",    "window_seconds": 0,    "filters": {},    "url_param_key": "string"  },  "visitors": 0,  "affected_visitors": 0,  "slow_visitors": 0,  "slow_lcp_threshold_ms": 0,  "ordered_visitors": 0,  "checkout_visitors": 0,  "error_checkout_visitors": 0,  "cart_visitors": 0,  "single_page_visitors": 0}