With an authenticated user it is possible to load the page statistics.
GET <cambuildr-url>/api/v1/pages/statistics
The Accept
header has to be set to application/json
for this route to work properly.
This returns the page statistics (visits and conversions) grouped by day and name, as well as the sum and count of all pages:
{
"error": false,
"results": [
{
"day": "2025-04-18",
"name": "Demo UGC",
"visits": 1,
"conversions": 0
},
{
"day": "2025-04-21",
"name": "Demo UGC",
"visits": 1,
"conversions": 0
},
{
"day": "2025-04-25",
"name": "Demo UGC",
"visits": 1,
"conversions": 8
},
{
"day": "2025-05-12",
"name": "Demo UGC",
"visits": 1,
"conversions": 0
}
],
"total": {
"visits": 4,
"conversions": 8
}
}
By default, the statistics of the last 30 days are returned (also in the aggregation). The query parameters year
and month
(1-12) can be used to change this. month
is only used, if a year
is also defined.
For instance, GET <cambuildr-url>/api/v1/pages/statistics?year=2024&month=4
would only show the statistics from April 2024.
If the query-parameter format=csv
is sent with the request, the data is returned as CSV:
day,name,visits,conversions
2025-01-20,"Demo UGC",1,0
2025-02-05,"Demo UGC",1,1
2025-03-12,"Demo UGC",1,1