Stats
Stats offers a straightforward collection of API requests that give you the latest figures on your subscriber numbers, detailing both active and unsubscribed counts. Additionally, this information can be segmented for deeper insights.
Available Endpoints
Method | Endpoint | Name |
---|---|---|
GET | stats/site | Get Site Stats |
GET | stats/segment | Get Segment Stats |
GET | stats/report | Get Report Stats |
The Stats Model
The stats model offers straightforward totals and specific stats for your convenience. These data keys are accessible whether you're querying across the entire account or by individual segments.
Properties
- Name
user_count
- Type
- integer
- Description
Total count of users in the account or segment.
- Name
subscriber_count
- Type
- integer
- Description
Active user count for the account or segment.
- Name
unsubscriber_count
- Type
- integer
- Description
Number of subscribers that have unsubscribed in the account or segment.
Get Site Stats
Returns a list of site stats.
Required Attributes
- Name
site_uuid
- Type
- string
- Description
The UUID of the site to get stats for.
Request
curl -L -X GET 'https://app.bentonow.com/api/v1/stats/site?site_uuid=ExampleID1234' \
-H 'Accept: application/json' \
-H 'Authorization: Basic BASE64ENCODE(USERNAME+PASSWORD)'
Response
Returns site statistics including user, subscriber, and unsubscribed counts.
JSON Response
{
"user_count": 0,
"subscriber_count": 0,
"unsubscriber_count": 0
}
Get Segment Stats
Returns a list of a segments stats.
Required Attributes
- Name
site_uuid
- Type
- string
- Description
The UUID of the site to get stats for.
- Name
segment_id
- Type
- string
- Description
The id of the segment to get stats for.
Request
curl -L -X GET 'https://app.bentonow.com/api/v1/stats/segment?site_uuid=ExampleID1234&segment_id=123' \
-H 'Accept: application/json' \
-H 'Authorization: Basic BASE64ENCODE(USERNAME+PASSWORD)'
Response
Returns segment statistics including user, subscriber, and unsubscribed counts.
JSON Response
{
"user_count": 0,
"subscriber_count": 0,
"unsubscriber_count": 0
}
Get Report Stats
Returns an object containing data for a specific report.
Required Attributes
- Name
site_uuid
- Type
- string
- Description
The UUID of the site to get stats for.
- Name
report_id
- Type
- string
- Description
The id of the report to get stats for.
Request
curl -L -X GET 'https://app.bentonow.com/api/v1/stats/report?site_uuid=ExampleID1234&report_id=456' \
-H 'Accept: application/json' \
-H 'Authorization: Basic BASE64ENCODE(USERNAME+PASSWORD)'
Response
Returns a data blob containing the report statistics.
JSON Response
{
"report_data": {
"data": {
// Actual data points
},
"chart_style": "count", // Example chart style
"report_type": "Reporting::Reports::VisitorCountReport",
"report_name": "New Subscribers"
}
}