

# Analytics

You can use the Analytics dashboard to see various performance data about your applications. For the application you select, it reports the revenue the application earns, the infrastructure costs to run it, its current subscriptions, and the usage events it reports. You can compare what an application earns against what it costs to operate.

You can view the Analytics dashboard in the console, retrieve the same data with the AWS App Monetization skill, or call the REST API or the AWS SDKs.

You control what the dashboard shows with the following parameters:
+ **Application** – The application whose data the dashboard shows.
+ **Transactions** – Whether the dashboard shows **Live** or **Sandbox** data. Live shows real subscriber data. Sandbox shows transactions run against your app's draft plans. The default is **Live**.
+ **Date range** – The period the dashboard covers, either the last 7 days or the last 30 days. The default is 30 days.
+ **Plan** – An optional filter that narrows the Revenue and Subscriptions sections to specific plans.
+ **Metric** – An optional filter that narrows the Events section to specific metrics.
+ **Auto-refresh** – How often the dashboard refreshes: off, every 2 minutes, or every 5 minutes. The default is off.

**Note**  
In Sandbox, infrastructure costs are still real AWS spend, not test figures.

**Topics**
+ [Revenue](#analytics-revenue)
+ [Infrastructure costs](#analytics-costs)
+ [Subscriptions](#analytics-subscriptions)
+ [Events](#analytics-events)
+ [Retrieve analytics with the API](#analytics-api)

## Revenue
<a name="analytics-revenue"></a>

The Revenue section shows the amounts AWS App Monetization billed for the selected application, not the payments collected. Revenue is grouped by the month in which each billing period starts. The section shows the one or two calendar months that the date range covers, and names them. It reports the following, with all amounts in US dollars:
+ **Total revenue** – The combined subscription and usage revenue for those months.
+ **Subscription revenue** – The amount billed for plan subscriptions.
+ **Usage revenue** – The amount billed for metered usage.
+ **Revenue by plan** – The revenue each plan contributes.

## Infrastructure costs
<a name="analytics-costs"></a>

The Infrastructure costs section shows your AWS costs to run the selected application, so you can compare what the application earns against your AWS costs for the application. It reports your AWS total for the date range and a breakdown of cost by AWS service. Costs are estimated until actual billed costs are available. For more information, see [View infrastructure costs](cost-tracking.md#cost-tracking-read).

The section also lists your third-party costs, which are read-only in the console.

For how to turn on infrastructure cost tracking, attribute costs to customers, and add third-party costs, see [Cost tracking](cost-tracking.md).

## Subscriptions
<a name="analytics-subscriptions"></a>

The Subscriptions section shows a current snapshot of the application's subscribers by plan. It reflects the subscribers active now, rather than a count over the date range.

## Events
<a name="analytics-events"></a>

The Events section shows the usage events the application reported, grouped by metric, for the selected date range.

## Retrieve analytics with the API
<a name="analytics-api"></a>

Each section of the dashboard has an API operation. Each operation takes a `scope` of `live` or `sandbox`.
+ `GetAppRevenueSummary` – Revenue for a billing month, in `YYYY-MM` form, grouped by plan. The default is the current month.
+ `GetAppSubscriptionSummary` – Current subscribers, grouped by subscription status or by plan.
+ `GetAppUsageSummary` – Usage over a window of up to 720 hours, grouped by metric, by customer, or by UTC day.
+ `GetAppInfraCostSummary` – Infrastructure costs. For more information, see [View infrastructure costs](cost-tracking.md#cost-tracking-read).

You can also filter each summary. For details about each operation, see the [AWS App Monetization API Reference](https://docs.aws.amazon.com/appmonetization/latest/APIReference/).