Get website retention
analytics_getWebsiteRetentionReturning visitors: for each first-visit day in the range, how many came back on each later day, as counts and percentages. Dates: leave them out for the app's Last 7 days (today and the 6 days before it, from midnight in the site's time zone), or pass range (the app's presets), or startDate and endDate as days (YYYY-MM-DD, both included). timezone defaults to the site's. It calls one fixed endpoint of the Sextant Analytics API (https://sextantweb.com/docs/ai): path filters page URLs, query filters page query strings.
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": {
"siteId": "<siteId>"
},
"name": "analytics_getWebsiteRetention"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| os | No | Operating system used by the visitor. | |
| tag | No | Tag attached to the tracked activity. | |
| city | No | City of the visitor. | |
| path | No | Filter by page URL path. | |
| unit | No | Time interval used to group results: minute, hour, day, month, or year. | |
| endAt | No | End of the date range as a Unix timestamp in milliseconds. | |
| event | No | Filter by custom event name. | |
| match | No | Whether records must match all filters or any filter. | |
| query | No | Filter by page URL query string. | |
| range | No | A preset from the app's date picker, in the site's time zone. 7d, 30d, 90d: today and the days before it, from local midnight. 24h: the current hour and the 23 before it. 12m, 24m, 36m: this month and the months before it, from the 1st. month: this month. today: since local midnight. It gives the same numbers as the app. Leave out the other date fields when you use it. | |
| title | No | Filter by page title. | |
| cohort | No | ID of a saved cohort used to filter visitors. | |
| device | No | Device category used by the visitor. | |
| region | No | Region or subdivision of the visitor. | |
| siteId | Yes | The Sextant site ID. | |
| browser | No | Browser used by the visitor. | |
| country | No | Country code of the visitor. | |
| endDate | No | Last day of the range (YYYY-MM-DD), included to its end in the site's time zone. An ISO date-time is used as is. | |
| segment | No | ID of a saved segment used to filter results. | |
| startAt | No | Start of the date range as a Unix timestamp in milliseconds. | |
| utmTerm | No | UTM campaign search term. | |
| hostname | No | Hostname on which the activity occurred. | |
| language | No | Preferred language reported by the visitor browser. | |
| objectId | No | Optional: a short link or tracking pixel of this site, to read its analytics instead of the site's. | |
| referrer | No | Filter by referring URL. | |
| timezone | No | IANA time zone used to interpret dates and group results, for example America/New_York. | |
| eventType | No | Event type: 1 for a pageview or 2 for a custom event. | |
| startDate | No | First day of the range (YYYY-MM-DD), from local midnight in the site's time zone. An ISO date-time is used as is. | |
| utmMedium | No | UTM campaign medium. | |
| utmSource | No | UTM campaign source. | |
| distinctId | No | Custom identifier assigned to the visitor. | |
| utmContent | No | UTM campaign content. | |
| utmCampaign | No | UTM campaign name. | |
| excludeBounce | No | Set a non-empty value to exclude visits with only one pageview. |