Get campaign statistics
Describes the request and response details of this Moosend API endpoint to get campaign statistics.
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 | date | false | The specific year, month, and day the activity occurred. The |
Response
Status | Description | Headers | Schema |
|---|---|---|---|
| The request is successful. |
| N/A |
Code- the response code. This is0if successful.Error- the response error message. This isnullif successful.Context- an object that contains all thePagingandAnalyticsinformation for the campaign:Paging- an object that contains the following information:PageSize- the page size of the results. This is0if not defined.CurrentPage- the number of the result page. This is1if 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 isfalseif 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 activityTypemade by the recipient. This can be opens, link clicks, and so on. DeprecatedUniqueCount- the total number of unique statistics based on the activityTypemade by the recipient. This can be opens, link clicks, and so on. DeprecatedContextDescription:Type is
Unsubscribed- this contains the date-time the recipient unsubscribed from the campaign.Type is
LinkClicked- the link URL clicked will be displayed as an extra as seen in the above code example.Type is
Bounced- the Bounced Type will be displayed as an extra.Type is
Complains- the Timestamp will be displayed as an extra.
Timestamp- for all parametersSent,opened,LinkClickedetc an extra field with the time of the action is added in the response.
Campaign Activity:Context- This will show Country Code if the type isopened, the link is the type isLinkedClickedand the timestamp if the type isComplain.Email- the email address of the recipient.IpAddress- the IP address of the recipient.MailingListId- the mailing list that the recipient belongs to.MemberID- The recipients ID.Name- the recipient's name.Status- The status of the activity.Timestamp- the timestamp of the action.