Timeline stats
Fetch statistics with timeline data to be plotted on a chart
Available on:
Path parameters
-
ID of an account
Query parameters
-
Period to fetch stats for
Values are
TODAY
,YESTERDAY
,THIS_WEEK
,LAST_WEEK
,THIS_MONTH
,LAST_MONTH
,LAST_30_DAYS
, orLAST_3_MONTHS
.
GET /accounts/{account_id}/timeline
curl \
-X GET https://api.clickguard.com/accounts/{account_id}/timeline?period=TODAY \
-H "X-API-KEY: $API_KEY"
Response examples (200)
"{\n \"total_clicks\": [\n {\n \"x\": \"2021-04-18T15:00\",\n \"y\": 10\n },\n ...\n ],\n \"flagged_clicks\": [\n {\n \"x\": \"2021-04-18T15:00\",\n \"y\": 2\n },\n ...\n ],\n \"invalid_clicks\": [\n {\n \"x\": \"2021-04-18T15:00\",\n \"y\": 3\n },\n ...\n ]\n}"
Response examples (200)
{
"total_clicks": [
{
"x": "2024-05-04T09:42:00+00:00",
"y": 42.0
}
],
"flagged_clicks": [
{
"x": "2024-05-04T09:42:00+00:00",
"y": 42.0
}
],
"invalid_clicks": [
{
"x": "2024-05-04T09:42:00+00:00",
"y": 42.0
}
]
}