Menu
Amazon Mobile Analytics
User Guide

Querying Daily Metric Aggregates for Custom Events

Note

After April 30, 2018, Amazon Mobile Analytics features will be provided only by Amazon Pinpoint. If you're new to Mobile Analytics, use Amazon Pinpoint instead. If you're currently using Mobile Analytics, see Migrating from Amazon Mobile Analytics to Amazon Pinpoint.

These queries return daily metric aggregates for your app.

The URL for the average query is:

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

The URL for the sum query is:

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

The URL for the minimum query is:

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

The URL for the maximum query is:

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

The URL for the count query is:

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

The count metric contains the number of event occurrences where the metric was specified on the event.

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 .

{ "_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: