Get campaign statistics with paging and filter
Request
Parameter |
In |
Type |
Required |
Description |
---|---|---|---|---|
|
path |
string |
true |
The ID of the campaign that you are fetching statistics for. |
|
path |
string |
false |
The type of activity used to get information and display statistics. Possible values are:
|
|
path |
string |
true |
The supported file format for getting a response. Possible values: |
|
query |
string |
true |
The API key of your account. |
|
query |
number |
false |
The page number to display results for. If not specified, the first page is returned. |
|
query |
number |
false |
The maximum number of results per page. This must be a positive integer up to 1000. Returns 50 results per page if not specified. If a value greater than 1000 is specified, it is treated as 1000. |
|
query |
date |
false |
The start date value to return results. If not specified, results are returned from the date the campaign was sent. |
|
query |
date |
false |
The end date value to return results. If not specified, results are returned up to the current date. |
GET https://{hostname}/v3/campaigns/{CampaignID}/stats/{Type}.{Format}?apikey=&Page=&PageSize=&From&To=
Response
Status |
Description |
Headers |
Schema |
---|---|---|---|
|
The request is successful. |
|
N/A |
{
"Code": 0,
"Error": null,
"Context": {
"Paging": {
"PageSize": 5,
"CurrentPage": 1,
"TotalResults": 374,
"TotalPageCount": 75,
"SortExpression": null,
"SortIsAscending": false
},
"Analytics": [
{
"Context": "[email protected]",
"ContextName": "",
"TotalCount": 1,
"UniqueCount": 0,
"ContextDescription": null
},
{
"Context": "[email protected]",
"ContextName": "Paul",
"TotalCount": 1,
"UniqueCount": 0,
"ContextDescription": null
},
{
"Context": "[email protected]",
"ContextName": "John",
"TotalCount": 5,
"UniqueCount": 0,
"ContextDescription": null
},
{
"Context": "[email protected]",
"ContextName": "Marc",
"TotalCount": 4,
"UniqueCount": 0,
"ContextDescription": null
},
{
"Context": "[email protected]",
"ContextName": "",
"TotalCount": 3,
"UniqueCount": 0,
"ContextDescription": null
}
]
}
}
-
Code
- the response code. This is0
if successful. -
Error
- the response error message. This isnull
if successful. -
Context
- an object that contains all thePaging
andAnalytics
information for the campaign:-
Paging
- an object that contains the following information:-
PageSize
- the page size of the results. This is0
if not defined. -
CurrentPage
- the number of the result page. This is1
if not defined. -
Totalresults
- the number of results that are included in the response. -
TotalPageCount
- the total number of pages in your account. -
SortExpression
- the sort expression associated with the column or columns being sorted. -
SortIsAscending
- this isfalse
if the results are not displayed in ascending order based on the sort expression.
-
-
Analytics
- a list of recipients containing the following information for each recipient:-
Context
- the email address of the recipient. -
ContextName
- the name of the recipient. -
TotalCount
- the total number of statistics based on the activityType
made by the recipient. This can be opens, link clicks, and so on. -
UniqueCount
- the total number of unique statistics based on the activityType
made by the recipient. This can be opens, link clicks, and so on. -
ContextDescription
: If the selectedType
isUnsubscribed
, this contains the date-time the recipient unsubscribed from the campaign.
-
-