Get campaign statistics
Get all the campaign statistics.
Request
Method |
Request URI |
HTTP version |
---|---|---|
GET |
https://management.azure.com/subscriptions/{subscription-id}/resourcegroups/{resource-group-name}/providers/Microsoft.MobileEngagement/appcollections/{app-collection}/apps/{app-resource-name}/campaigns/{kind}/{id}/statistics?api-version=2014-12-01 |
HTTP/1.1 |
Authentication
See Authentication.
Request URI Path Parameters
Parameter |
Description |
---|---|
kind |
Kind of campaign. Valid values are: announcements, polls, dataPushes, and nativePushes. |
id |
Campaign identifier as returned by a call to Create campaign. You can get a list of campaigns by calling List campaigns. |
Query String Parameters
Parameter |
Description |
---|---|
api-version |
API version, the only supported value is 2014-12-01. |
Request Headers
The following table describes required and optional request headers.
Request Header |
Description |
---|---|
Authorization |
See Authentication. |
Accept (optional) |
Its recommended to pass */* or application/json to have JSON error responses. |
Request Body
None.
Response
Response Status Codes
Code |
Description |
---|---|
200 |
Success, statistics are returned as JSON. |
400 |
Invalid parameters or application is disabled. Check response body for details. |
401 |
Authentication error. |
404 |
Campaign not found. |
For information about status codes, see Status and Error Codes.
Response Headers
Content-Type |
application/json;charset=utf-8 |
Response Body
A JSON object containing the following properties if the request was successful.
Property |
Description |
---|---|
queued |
Number of times the campaign was registered to be pushed. |
pushed |
Number of pushes performed. |
pushed-native |
Total number of native pushes. Information only available on Android, iOS, Windows Phone, |
pushed-native-google |
Number of C2DM/GCM pushes (available only on Android applications). |
pushed-native-adm |
Number of ADM pushes (available only on Android applications). |
delivered |
Number of times the campaign was received by the application (Not present in case of a |
dropped |
Number of times the campaign was dropped by the application. It can happen if the SDK |
system-notification-displayed |
Number of times the system notification was displayed (Not present in case of a data-push |
in-app-notification-displayed |
Number of times the in-app notification was displayed (Not present in case of a data-push |
content-displayed |
Number of times the campaign’s content view was displayed (Not present in case of a |
system-notification-actioned |
Number of times the system notification (On Android it corresponds to a status bar |
system-notification-exited |
Number of times the system notification was exited (Not present in case of a data-push |
in-app-notification-actioned |
Number of times the in-app notification was actioned (Not present in case of a data-push |
in-app-notification-exited |
Number of times the in-app notification was exited (Not present in case of a data-push |
content-actioned |
Number of times the campaign’s content view was actioned (Not present in case of a |
content-exited |
Number of times the campaign’s content view was exited (Not present in case of a |
answers |
Poll specific statistics. See example below.
|
indexed-answers |
Poll specific statistics, very similar to answers but
|
The following is an example.
GET /subscriptions/84211edf-7c40-4c47-b152-a6a7233843b7/resourcegroups/MobileEngagement/providers/Microsoft.MobileEngagement/appcollections/myAppCollection/apps/myApp-android/campaigns/polls/1/statistics?api-version=2014-12-01 HTTP/1.1
Host: management.azure.com
Accept: */*
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iL
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
{
"queued":6,
"pushed":6,
"pushed-native":0,
"delivered":2,
"dropped":0,
"in-app-notification-displayed":2,
"system-notification-displayed":0,
"content-displayed":1,
"in-app-notification-actioned":1,
"system-notification-actioned":0,
"in-app-notification-exited":1,
"system-notification-exited":0,
"content-actioned":1,
"content-exited":0,
"answers":{
"Question 1":{
"Choice 1.2":1,
"Choice 1.1":0
},
"Question 2":{
"Choice 2.2":1,
"Choice 2.1":0
}
},
"indexed-answers": [[1,0],[1,0]]
}
Example
GET /subscriptions/84211edf-7c40-4c47-b152-a6a7233843b7/resourcegroups/MobileEngagement/providers/Microsoft.MobileEngagement/appcollections/myAppCollection/apps/myApp-android/campaigns/polls/1/statistics?api-version=2014-12-01 HTTP/1.1
Host: management.azure.com
Accept: */*
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iL
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
{
"queued":6,
"pushed":6,
"pushed-native":0,
"delivered":2,
"dropped":0,
"in-app-notification-displayed":2,
"system-notification-displayed":0,
"content-displayed":1,
"in-app-notification-actioned":1,
"system-notification-actioned":0,
"in-app-notification-exited":1,
"system-notification-exited":0,
"content-actioned":1,
"content-exited":0,
"answers":{
"Question 1":{
"Choice 1.2":1,
"Choice 1.1":0
},
"Question 2":{
"Choice 2.2":1,
"Choice 2.1":0
}
},
"indexed-answers": [[1,0],[1,0]]
}