Menu
Amazon Mobile Analytics
User Guide

Querying Counts of Event Occurrences

To query the number of occurrences of custom events you must know the name of the custom event. The URL to query counts of custom events is:

Copy
https://mobileanalytics.us-east-1.amazonaws.com/2014-06-05/apps/<YOUR APP ID>/events/<CUSTOM EVENT NAME>/count

Example Response

Here is an example of the JSON returned in the response of a query for a "LevelComplete" custom event. The value in the rows attribute contains the KPI value.

Copy
{ "_links" : { "self" : { "href" : "/2014-06-05/apps/<YOUR APP ID>/events/LevelComplete/count?start=2015-12-01&end=2015-12-08", "name" : "count" }, "example" : [{ "href" : "/2014-06-05/apps/<YOUR APP ID>/events/LevelComplete/count?start=7-days-ago&end=today", "name" : "last-7-days-all-platforms", "title" : "Last 7 Days All Platforms" }, { "href" : "/2014-06-05/apps/<YOUR APP ID>/events/LevelComplete/count?start=30-days-ago&end=today", "name" : "last-30-days-all-platforms", "title" : "Last 30 Days All Platforms" }, { "href" : "/2014-06-05/apps/<YOUR APP ID>/events/LevelComplete/count?start=60-days-ago&end=today", "name" : "last-60-days-all-platforms", "title" : "Last 60 Days All Platforms" } ], "up" : [{ "href" : "/2014-06-05/apps/<YOUR APP ID>/events/LevelComplete", "name" : "LevelComplete" } ] }, "columns" : { "day" : { "colIndex" : 0, "type" : "Qualitative", "dataType" : "ISODateTime", "unit" : null, "name" : "day", "displayName" : "Date" }, "count" : { "colIndex" : 1, "type" : "Quantitative", "dataType" : "Double", "unit" : null, "name" : "count", "displayName" : "Count" } }, "rows" : [ ["2015-12-01", 234.0], ["2015-12-02", 432.0], ["2015-12-03", 543.0], ["2015-12-04", 324.0], ["2015-12-05", 446.0], ["2015-12-06", 394.0], ["2015-12-07", 236.0], ["2015-12-08", 846.0]], "scope" : { "appId" : "<YOUR APP ID>", "eventName" : "LevelComplete", "aggregate" : "count" } }

On this page: