{"_id":"55ed12de8da0b12100e6424e","editedParams2":true,"editedParams":true,"parentDoc":null,"__v":1,"category":{"_id":"55e67b5dde6fef23009480ca","__v":20,"pages":["55ed06c7023a81170018f163","55ed079b0d968e2100de8339","55ed0b530d968e2100de8345","55ed0bb078319821005005cf","55ed0df94fba582b0036a18a","55ed0e0c4fba582b0036a18d","55ed0ebd8da0b12100e64246","55ed10bec9d5b3350072ae9a","55ed11410d968e2100de834d","55ed118678319821005005d9","55ed121dc9d5b3350072ae9e","55ed12de8da0b12100e6424e","55ed13930d968e2100de8352","55ed140c4fba582b0036a196","55ed1902c9d5b3350072aebb","55ed197bc9d5b3350072aec0","55ee3dba1452cd0d009e5ee9","5600a22f0c703d19009531e1","5600c6b23aa0520d00da0c41","561da674e078f40d00eadd75"],"project":"55e67aaa9cc7c62b00c4a1ea","version":"55e67aab9cc7c62b00c4a1ed","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-09-02T04:30:21.948Z","from_sync":false,"order":5,"slug":"rest-api","title":"REST API"},"project":"55e67aaa9cc7c62b00c4a1ea","user":"55d2bd8e2463351700f67dd7","version":{"_id":"55e67aab9cc7c62b00c4a1ed","project":"55e67aaa9cc7c62b00c4a1ea","__v":10,"createdAt":"2015-09-02T04:27:23.612Z","releaseDate":"2015-09-02T04:27:23.612Z","categories":["55e67aac9cc7c62b00c4a1ee","55e67b5556007d23005fee7d","55e67b5dde6fef23009480ca","55e680efde6fef23009480db","55e6829485a9741900314e99","561c61b4ad272c0d00a892df","586c014c0abf1d0f000d04d4","58991d2ad207df0f0002186b","589b8e1fdbb7cd190026732c","58b8ca5e3265d70f001788d4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-07T04:30:22.478Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"{\n\t\"id\": \"58c9aa0c3431340008855116\",\n\t\"audience_id\": \"58210c663963320008001767\",\n  \"push_text\": \"Check out this sweet deal!\",\n  \"published_time\": \"2017-03-15T20:54:36.675Z\",\n  \"direct_opens\": 100,\n  \"indirect_opens\": 50,\n  \"influenced_opens\": 150,\n  \"opens\": 100,\n  \"pushes_succeeded\": 200,\n  \"pushes_rejected\": 0,\n  \"event_conversions\": {\n    \"purchase\": 4\n  }\n}","language":"json","status":200},{"status":401,"name":"","code":"{\n  \"error\":\"unauthorized\"\n}","language":"json"},{"language":"json","status":403,"code":"{\n  \"error\":\"your api client does not have the correct roles\"\n}"}]},"settings":"","examples":{"codes":[{"name":"","code":"curl -X GET -u :API_KEY https://api.carnivalmobile.com/v5/stats/notifications/:notification_id/events","language":"curl"}]},"method":"get","auth":"required","params":[{"_id":"55ed121dc9d5b3350072ae9f","ref":"","in":"path","required":true,"desc":"The ID of the notification as reported from the [Notifications API](doc:notifications) response. Use the `id` inside the `notification` object.","default":"","type":"string","name":"notification_id"}],"url":"/stats/notifications/:notification_id/events"},"isReference":true,"order":20,"body":"This endpoint returns data and metrics for a given Push Notification ID. Metrics are updated in real time. Influenced opens (including direct and indirect) and events are counted using our [standard attribution windows](https://marketing.carnival.io/docs/message-analytics).\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"`id`\",\n    \"0-1\": \"String\",\n    \"0-2\": \"The Push Notification ID\",\n    \"1-0\": \"`audience_id`\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Audience ID of the targeted audience. Each audience (including on-the-fly audiences) will have its own ID.\",\n    \"2-0\": \"`push_text`\",\n    \"2-1\": \"String\",\n    \"2-2\": \"The body of the push alert\",\n    \"3-0\": \"`published_time`\",\n    \"3-1\": \"Date\",\n    \"3-2\": \"Date when the push notification was sent\",\n    \"4-0\": \"`direct_opens`\",\n    \"4-1\": \"Integer\",\n    \"4-2\": \"How many times users opened the app as a result of tapping the push alert directly\",\n    \"5-0\": \"`indirect_opens`\",\n    \"5-1\": \"Integer\",\n    \"5-2\": \"How many times users opened the app as a result of receiving a push notification, then opening the app without interacting with the push alert\",\n    \"6-0\": \"`influenced_opens`\",\n    \"6-1\": \"Integer\",\n    \"6-2\": \"Sum of `direct_opens` and `indirect_opens`\",\n    \"7-0\": \"`opens`\",\n    \"7-1\": \"Integer\",\n    \"7-2\": \"Same as `direct_opens`\",\n    \"8-0\": \"`pushes_succeeded`\",\n    \"8-1\": \"Integer\",\n    \"8-2\": \"Number of pushes sent based on gateway status (i.e. valid push tokens)\",\n    \"9-0\": \"`pushes_rejected`\",\n    \"9-1\": \"Integer\",\n    \"9-2\": \"Number of pushes rejected based on gateway status (i.e. invalid push tokens)\",\n    \"10-0\": \"`event_conversions`\",\n    \"10-1\": \"Dictionary<String, Integer>\",\n    \"10-2\": \"A list of custom events where the key is a [custom event](doc:collecting-user-data) and the value is the number of occurrences of this event\"\n  },\n  \"cols\": 3,\n  \"rows\": 11\n}\n[/block]","excerpt":"Returns metrics for a given push notification","slug":"push-notification-stats","type":"endpoint","title":"Stats / Push Notifications"}

getStats / Push Notifications

Returns metrics for a given push notification

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

notification_id:
required
string
The ID of the notification as reported from the [Notifications API](doc:notifications) response. Use the `id` inside the `notification` object.

Examples


Result Format


Documentation

This endpoint returns data and metrics for a given Push Notification ID. Metrics are updated in real time. Influenced opens (including direct and indirect) and events are counted using our [standard attribution windows](https://marketing.carnival.io/docs/message-analytics). [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Description", "0-0": "`id`", "0-1": "String", "0-2": "The Push Notification ID", "1-0": "`audience_id`", "1-1": "String", "1-2": "Audience ID of the targeted audience. Each audience (including on-the-fly audiences) will have its own ID.", "2-0": "`push_text`", "2-1": "String", "2-2": "The body of the push alert", "3-0": "`published_time`", "3-1": "Date", "3-2": "Date when the push notification was sent", "4-0": "`direct_opens`", "4-1": "Integer", "4-2": "How many times users opened the app as a result of tapping the push alert directly", "5-0": "`indirect_opens`", "5-1": "Integer", "5-2": "How many times users opened the app as a result of receiving a push notification, then opening the app without interacting with the push alert", "6-0": "`influenced_opens`", "6-1": "Integer", "6-2": "Sum of `direct_opens` and `indirect_opens`", "7-0": "`opens`", "7-1": "Integer", "7-2": "Same as `direct_opens`", "8-0": "`pushes_succeeded`", "8-1": "Integer", "8-2": "Number of pushes sent based on gateway status (i.e. valid push tokens)", "9-0": "`pushes_rejected`", "9-1": "Integer", "9-2": "Number of pushes rejected based on gateway status (i.e. invalid push tokens)", "10-0": "`event_conversions`", "10-1": "Dictionary<String, Integer>", "10-2": "A list of custom events where the key is a [custom event](doc:collecting-user-data) and the value is the number of occurrences of this event" }, "cols": 3, "rows": 11 } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}