fastmon Docs
Analytics

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.

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

Authorization

bearerAuth
headerAuthorizationBearer <token>

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
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

identity?|

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

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 (contains_checkout_stage)

checkout_visitors*Checkout Visitors

Visitors who reached the checkout stage, on either side like the filter

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
curl -X POST 'https://api.fastmon.eu/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/analytics/visitors/segments' \  -H 'Content-Type: application/json' \  -d '{  "time_range": {    "from": "2019-08-24T14:15:22Z",    "to": "2019-08-24T14:15:22Z"  }}'
{  "meta": {    "execution_time_ms": 0,    "total": 0,    "limit": 0,    "offset": 0,    "has_more": true,    "next_cursor": "string",    "sampling": {      "sampling_rate": 0,      "is_sampled": true,      "estimated_metrics": [        "string"      ]    },    "is_identity_mixed": true  },  "request": {    "time_range": {      "from": "2019-08-24T14:15:22Z",      "to": "2019-08-24T14:15:22Z"    },    "comparison_time_range": {      "from": "2019-08-24T14:15:22Z",      "to": "2019-08-24T14:15:22Z"    },    "granularity": "minute",    "identity": "stitch",    "window_seconds": 0,    "filters": {}  },  "visitors": 0,  "affected_visitors": 0,  "slow_visitors": 0,  "slow_lcp_threshold_ms": 0,  "ordered_visitors": 0,  "checkout_visitors": 0,  "cart_visitors": 0,  "single_page_visitors": 0}