Menu
Amazon Mobile Analytics
User Guide

Querying Counts of Event Occurrences with Specified Metric Name

This query returns the number of event occurrences containing a specific metric name. The URL for this query is:

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

Example Response

Here is an example of the JSON returned in the response of a query of the average of the TimeToComplete metric of the LevelComplete custom event. The query URL used was https://mobileanalytics.us-east-1.amazonaws.com/2014-06-05/apps/<YOUR APP ID>/events/LevelComplete/metrics/TimeToComplete/avg .

Copy
{ "_links" : { "self" : { "href" : "/2014-06-05/apps/<YOUR APP ID>/events/LevelComplete/metrics/TimeToComplete/avg?start=2015-12-01&end=2015-12-08", "name" : "avg" }, "example" : [{ "href" : "/2014-06-05/apps/<YOUR APP ID>/events/LevelComplete/metrics/TimeToComplete/avg?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/metrics/TimeToComplete/avg?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/metrics/TimeToComplete/avg?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/metrics/TimeToComplete", "name" : "TimeToComplete" } ] }, "columns" : { "day" : { "colIndex" : 0, "type" : "Qualitative", "dataType" : "ISODateTime", "unit" : null, "name" : "day", "displayName" : "Date" }, "avg" : { "colIndex" : 1, "type" : "Quantitative", "dataType" : "Double", "unit" : null, "name" : "avg", "displayName" : "Avg" } }, "rows" : [ ["2015-12-01", 32.2], ["2015-12-02", 35.4], ["2015-12-03", 32.5], ["2015-12-04", 40.3], ["2015-12-05", 36.6], ["2015-12-06", 31.3], ["2015-12-07", 35.2], ["2015-12-08", 34.7]], "scope" : { "metricName" : "LevelComplete", "appId" : "<YOUR APP ID>", "eventName" : "LevelComplete", "aggregate" : "avg" }, "weightedAverage" : 34.8 }

On this page: