Analytics

Get list of visitors with summary information

Changed on
get/analytics/visitors

Request

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

Query parameters

start_datestring required

Start date in format YYYY-MM-DD HH:MM:SS

end_datestring required

End date in format YYYY-MM-DD HH:MM:SS

project_idinteger required

Project ID or slug

environment_idinteger

Environment ID (optional)

include_crawlersboolean

Include crawlers (default: false)

limitinteger

Maximum number of visitors to return (default: 50)

offsetinteger

Number of visitors to skip (default: 0)

has_activity_onlyboolean

Filter to only include visitors with recorded activity (events/sessions). When true, excludes ghost visitors (default: true)

filter_countrystring

Geolocation country

filter_regionstring

Geolocation region

filter_citystring

Geolocation city

filter_channelstring

First-touch channel

filter_referrerstring

First-touch referrer hostname (use 'Direct' for null)

filter_user_idstring

User id set by identify(): the same user on every device

Response

Successfully retrieved visitors

filtered_countinteger required
total_countinteger required

Example response

{
  "visitors": [
    {
      "first_seen": "2024-01-01T00:00:00",
      "last_seen": "2024-01-01T00:00:00"
    }
  ]
}

Changes

    • breaking

      the response property visitors/items/environment_id became nullable for the status

    • breaking

      the response property visitors/items/environment_id became optional for the status

    • info

      added the optional property visitors/items/browser to the response with the status

    3 more changes in this revision