With an authenticated user it is possible to load the landing page statistics.
GET <cambuildr-url>/api/v1/landing-pages/statistics
The Accept header has to be set to application/json for this route to work properly.
This returns the landing page statistics (visits, signups and new contacts) grouped by day and name, as well as the sum and count of all landing pages:
{
"error": false,
"landing_pages": [
{
"day": "2024-03-11",
"name": "LP Name #1",
"visits": 1,
"signups": 0,
"new_contacts": "0"
},
{
{
"day": "2024-03-11",
"name": "LP Name #2",
"visits": 1,
"signups": 0,
"new_contacts": "0"
},
{
"day": "2024-03-25",
"name": "LP Name #1",
"visits": 3,
"signups": 1,
"new_contacts": "0"
},
{
"day": "2024-03-26",
"name": "LP Name #3",
"visits": 1,
"signups": 1,
"new_contacts": "1"
}
],
"total": {
"visits": 6,
"signups": 2,
"new_contacts": 1
}
}
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/landing-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,signups,new_contacts
2024-03-11,"LP #1",1,0,0
2024-03-11,"LP #2",1,0,0
