curl --request POST \
--url https://api.trieve.ai/api/analytics/events/ctr \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Dataset: <tr-dataset>' \
--data '{
"type": "search_ctr_metrics",
"filter": {
"component_name": "<string>",
"date_range": {
"gt": "2021-01-01 00:00:00.000",
"gte": "2021-01-01 00:00:00.000",
"lt": "2021-01-01 00:00:00.000",
"lte": "2021-01-01 00:00:00.000"
},
"query": "<string>",
"query_rating": {
"gt": 1,
"gte": 1,
"lt": 1,
"lte": 1
},
"search_method": "fulltext",
"search_type": "search",
"top_score": {
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
}
}'{
"avg_position_of_click": 123,
"percent_searches_with_clicks": 123,
"percent_searches_without_clicks": 123,
"searches_with_clicks": 123
}This route allows you to view the CTR analytics for a dataset.
curl --request POST \
--url https://api.trieve.ai/api/analytics/events/ctr \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Dataset: <tr-dataset>' \
--data '{
"type": "search_ctr_metrics",
"filter": {
"component_name": "<string>",
"date_range": {
"gt": "2021-01-01 00:00:00.000",
"gte": "2021-01-01 00:00:00.000",
"lt": "2021-01-01 00:00:00.000",
"lte": "2021-01-01 00:00:00.000"
},
"query": "<string>",
"query_rating": {
"gt": 1,
"gte": 1,
"lt": 1,
"lte": 1
},
"search_method": "fulltext",
"search_type": "search",
"top_score": {
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
}
}'{
"avg_position_of_click": 123,
"percent_searches_with_clicks": 123,
"percent_searches_without_clicks": 123,
"searches_with_clicks": 123
}The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
JSON request payload to filter the graph
search_ctr_metrics Show child attributes
DateRange is a JSON object which can be used to filter chunks by a range of dates. This leverages the time_stamp field on chunks in your dataset. You can specify this if you want values in a certain range. You must provide ISO 8601 combined date and time without timezone.
{
"gt": "2021-01-01 00:00:00.000",
"gte": "2021-01-01 00:00:00.000",
"lt": "2021-01-01 00:00:00.000",
"lte": "2021-01-01 00:00:00.000"
}{ "gt": 1, "gte": 1, "lt": 1, "lte": 1 }fulltext, semantic, hybrid, bm25 search, autocomplete, search_over_groups, search_within_groups The CTR analytics for the dataset
Was this page helpful?