Agent analytics
Conversions
Observed conversion analytics for the selected project and scope.
GET
/api/domains/{host}/agent-analyticsRequest#
GET /api/domains/{host}/agent-analytics?section=conversions
curl --fail-with-body 'https://app.keptai.com/api/domains/example.com/agent-analytics?section=conversions&days=30' \
-H "Authorization: Bearer $KEPT_API_TOKEN"
const response = await fetch(
'https://app.keptai.com/api/domains/example.com/agent-analytics?section=conversions&days=30',
{ headers: { Authorization: `Bearer ${process.env.KEPT_API_TOKEN}` } }
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
console.log(data);
import json, os, urllib.request
request = urllib.request.Request(
'https://app.keptai.com/api/domains/example.com/agent-analytics?section=conversions&days=30',
headers={'Authorization': 'Bearer ' + os.environ['KEPT_API_TOKEN']}
)
with urllib.request.urlopen(request) as response:
print(json.load(response))
Parameters#
| Parameter | Values |
|---|---|
| host (path) | Project domain without a scheme or path. |
| section | Use conversions for this page. |
| days | 7, 30, or 90; default 30. |
| engine | Supported engine ID; comma-separated values are supported. |
| topic, category, brand | Optional comma-separated values from scope-options. |
Response and interpretation#
The response is JSON in the conversions section’s application shape. Preserve its structure when building an integration; do not assume it shares a schema with other sections. Use the actual returned data rather than invented example values.
This view requires the domain to be connected to Kept Gateway (CNAME to gateway.freem.ai and completed DCV). See Connecting your data.
See Scope options for valid filters and Authentication for errors.