Get journeys
get_journeysGet visitor journeys on one site, one row per visitor with an event in the date range. A journey covers that visitor's events in the lookback_days up to their last event in the range. Each row has the journey's value per currency, the count of each event, its last 50 events with their times, and the first and last touch credited (source and UTM tags). Events with no visitor id are their own rows. Ranges before the plan's journey lookback are refused. Use it when the user asks about customer, user, or conversion journeys: what visitors did on the site before they converted, and which first and last touch the conversion is credited to.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site_id": "<site_id>",
"from": "<from>",
"to": "<to>"
},
"name": "get_journeys"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Range end. YYYY-MM-DD means the end of that day in `timezone`, so the whole day is included; a full ISO 8601 timestamp is used as is. | |
| from | Yes | Range start. YYYY-MM-DD means the start of that day in `timezone`; a full ISO 8601 timestamp is used as is. | |
| page | No | Page to return. Default 1. | |
| sort | No | most_recent: newest latest event first. highest_value: largest journey value first. Default most_recent. | |
| limit | No | Journeys per page. Default 25. | |
| events | No | Only journeys with at least one of these events, such as Purchase. Names are in list_supported_values's `events`. Default: the conversion events. Add PageView to include visitors who did not convert. | |
| site_id | Yes | Site to act on, as returned by list_sites. | |
| sources | No | Only journeys with at least one event from these traffic source buckets, such as facebook, google, organic, or direct. Names are in list_supported_values's `sources`. (not set) matches a blank value. | |
| timezone | No | IANA time zone such as Europe/Berlin. Default UTC. Returned times and day buckets use it. | |
| utm_term | No | Only journeys with at least one event carrying one of these UTM terms (usually the ad set). (not set) matches a blank value. | |
| visitor_id | No | One visitor's journey, visitor_id from an earlier row or from list_events. | |
| utm_content | No | Only journeys with at least one event carrying one of these UTM contents (usually the ad). (not set) matches a blank value. | |
| utm_campaign | No | Only journeys with at least one event carrying one of these UTM campaigns. (not set) matches a blank value. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | Yes | Sort used. | |
| total | Yes | Journeys matching the filters, across all pages. | |
| window | Yes | Exact range read, after applying timezone. | |
| journeys | Yes | Journeys on this page, in the requested sort. | |
| timezone | Yes | IANA time zone used for dates and times. UTC when none was passed. | |
| next_page | Yes | Pass as page for the next page, with the same filters and sort. null: last page. | |
| lookback_days | Yes | Days before a visitor's last event that their journey covers. |