Analytics

Get detailed information about a specific visitor by numeric ID

Changed on
get/analytics/visitors/{visitor_id}

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Path parameters

visitor_idinteger required

Visitor numeric ID

Query parameters

project_idinteger required

Project ID or slug

environment_idinteger

Environment ID (optional)

Response

Successfully retrieved visitor details

asn_numberinteger nullable

Autonomous system (network) number the visitor's IP is announced from, when an ASN database was loaded.

asn_orgstring nullable

Organisation operating that network.

citystring nullable
countrystring nullable
country_codestring nullable
crawler_namestring nullable
custom_dataunknown
environment_idinteger nullable
first_channelstring nullable

Marketing channel from the first visit (e.g. "Organic Search", "Direct")

first_referrerstring nullable

Full referrer URL from the visitor's first session

first_referrer_hostnamestring nullable

Hostname extracted from first_referrer

first_seenstring date-time required
idinteger required
identified_atstring date-time nullable
identity_sourcestring nullable

Who set user_id: browser (the SDK) or server (a deployment token). None while the visitor is anonymous.

ip_addressstring nullable
ip_address_idinteger nullable
is_crawlerboolean required
is_euboolean nullable
last_seenstring date-time required
latitudenumber double nullable
longitudenumber double nullable
project_idinteger required
regionstring nullable
timezonestring nullable
trait_sourcesunknown
user_agentstring nullable
user_idstring nullable

The app's own user id, once identify() labelled this visitor.

visitor_idstring required

Example response

{
  "first_seen": "2024-01-01T00:00:00",
  "identified_at": "2024-01-01T00:00:00Z",
  "last_seen": "2024-01-01T00:00:00"
}

Changes

    • breaking

      the response property environment_id became nullable for the status

    • breaking

      the response property environment_id became optional for the status

    • info

      added the optional property identified_at to the response with the status

    3 more changes in this revision