Skip to content

Commit

Permalink
Merged PR 10236: Documented several new Store REST APIs for insights …
Browse files Browse the repository at this point in the history
…data
  • Loading branch information
mcleanbyron committed Jul 31, 2018
1 parent b3d0fa0 commit edc2fec
Show file tree
Hide file tree
Showing 4 changed files with 312 additions and 59 deletions.
61 changes: 2 additions & 59 deletions windows-apps-src/develop/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@
####### [Get add-on acquisitions](../monetize/get-in-app-acquisitions.md)
####### [Get subscription add-on acquisitions](../monetize/get-subscription-acquisitions.md)
####### [Get add-on conversions by channel](../monetize/get-add-on-conversions-by-channel.md)
###### [Get insights data for your app](../monetize/get-insights-data-for-your-app.md)
###### [Get app ratings](../monetize/get-app-ratings.md)
###### [Get app reviews](../monetize/get-app-reviews.md)
###### [Get error reporting data](../monetize/get-error-reporting-data.md)
Expand All @@ -260,6 +261,7 @@
###### [Get ad campaign performance data](../monetize/get-ad-campaign-performance-data.md)
##### Desktop apps
###### [Get desktop application installs](../monetize/get-desktop-app-installs.md)
###### [Get insights data for your desktop application](../monetize/get-insights-data-for-your-desktop-app.md)
###### [Get upgrade blocks for your desktop application](../monetize/get-desktop-block-data.md)
###### [Get upgrade block details for your desktop application](../monetize/get-desktop-block-data-details.md)
###### [Get error reporting data for your desktop application](../monetize/get-desktop-application-error-reporting-data.md)
Expand Down Expand Up @@ -725,62 +727,3 @@
### [Submit a work item to the thread pool](../threading-async/submit-a-work-item-to-the-thread-pool.md)
### [Use a timer to submit a work item](../threading-async/use-a-timer-to-submit-a-work-item.md)
### [Using Windows Runtime objects in a multithreaded environment](../threading-async/using-windows-runtime-objects-in-a-multithreaded-environment.md)



























































Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ The following analytics methods are available for UWP apps in Dev Center.
|---------------|--------------------|
| Acquisitions, conversions, and installs | <ul><li>[Get app acquisitions](get-app-acquisitions.md)</li><li>[Get app acquisition funnel data](get-acquisition-funnel-data.md)</li><li>[Get app conversions by channel](get-app-conversions-by-channel.md)</li><li>[Get add-on acquisitions](get-in-app-acquisitions.md)</li><li>[Get subscription add-on acquisitions](get-subscription-acquisitions.md)</li><li>[Get add-on conversions by channel](get-add-on-conversions-by-channel.md)</li><li>[Get app installs](get-app-installs.md)</li></ul> |
| App errors | <ul><li>[Get error reporting data](get-error-reporting-data.md)</li><li>[Get details for an error in your app](get-details-for-an-error-in-your-app.md)</li><li>[Get the stack trace for an error in your app](get-the-stack-trace-for-an-error-in-your-app.md)</li><li>[Download the CAB file for an error in your app](download-the-cab-file-for-an-error-in-your-app.md)</li></ul> |
| Insights | <ul><li>[Get insights data for your app](get-insights-data-for-your-app.md)</li></ul> |
| Ratings and reviews | <ul><li>[Get app ratings](get-app-ratings.md)</li><li>[Get app reviews](get-app-reviews.md)</li></ul> |
| In-app ads and ad campaigns | <ul><li>[Get ad performance data](get-ad-performance-data.md)</li><li>[Get ad campaign performance data](get-ad-campaign-performance-data.md)</li></ul> |

Expand All @@ -93,6 +94,7 @@ The following analytics methods are available for use by developer accounts that
| Installs | <ul><li>[Get desktop application installs](get-desktop-app-installs.md)</li></ul> |
| Blocks | <ul><li>[Get upgrade blocks for your desktop application](get-desktop-block-data.md)</li><li>[Get upgrade block details for your desktop application](get-desktop-block-data-details.md)</li></ul> |
| Application errors | <ul><li>[Get error reporting data for your desktop application](get-desktop-application-error-reporting-data.md)</li><li>[Get details for an error in your desktop application](get-details-for-an-error-in-your-desktop-application.md)</li><li>[Get the stack trace for an error in your desktop application](get-the-stack-trace-for-an-error-in-your-desktop-application.md)</li><li>[Download the CAB file for an error in your desktop application](download-the-cab-file-for-an-error-in-your-desktop-application.md)</li></ul> |
| Insights | <ul><li>[Get insights data for your desktop application](get-insights-data-for-your-desktop-app.md)</li></ul> |

### Methods for Xbox Live services

Expand Down
154 changes: 154 additions & 0 deletions windows-apps-src/monetize/get-insights-data-for-your-app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
---
author: mcleanbyron
description: Use this method in the Microsoft Store analytics API to get insights data for your app.
title: Get insights data
ms.author: mcleans
ms.date: 07/31/2018
ms.topic: article
ms.prod: windows
ms.technology: uwp
keywords: windows 10, uwp, Store services, Microsoft Store analytics API, insights
ms.localizationpriority: medium
---

# Get insights data

Use this method in the Microsoft Store analytics API to get insights data related to acquisitions, health, and usage metrics for an app during a given date range and other optional filters. This information is also available in the [Insights report](../publish/insights-report.md) in the Windows Dev Center dashboard.

## Prerequisites


To use this method, you need to first do the following:

* If you have not done so already, complete all the [prerequisites](access-analytics-data-using-windows-store-services.md#prerequisites) for the Microsoft Store analytics API.
* [Obtain an Azure AD access token](access-analytics-data-using-windows-store-services.md#obtain-an-azure-ad-access-token) to use in the request header for this method. After you obtain an access token, you have 60 minutes to use it before it expires. After the token expires, you can obtain a new one.

## Request


### Request syntax

| Method | Request URI |
|--------|----------------------|
| GET | ```https://manage.devcenter.microsoft.com/v1.0/my/analytics/insights``` |


### Request header

| Header | Type | Description |
|---------------|--------|-----------------------------------------------------------------------------|
| Authorization | string | Required. The Azure AD access token in the form **Bearer** &lt;*token*&gt;. |


### Request parameters

| Parameter | Type | Description | Required
|---------------|--------|---------------|------|
| applicationId | string | The [Store ID](in-app-purchases-and-trials.md#store-ids) of the app for which you want to retrieve insights data. If you do not specify this parameter, the response body will contain insights data for all apps registered to your account. | No |
| startDate | date | The start date in the date range of insights data to retrieve. The default is 30 days before the current date. | No |
| endDate | date | The end date in the date range of insights data to retrieve. The default is the current date. | No |
| filter | string | One or more statements that filter the rows in the response. Each statement contains a field name from the response body and value that are associated with the **eq** or **ne** operators, and statements can be combined using **and** or **or**. String values must be surrounded by single quotes in the *filter* parameter. For example, *filter=dataType eq 'acquisition'*. <p/><p/>You can specify the following filter fields:<p/><ul><li><strong>acquisition</strong></li><li><strong>health</strong></li><li><strong>usage</strong></li></ul> | No |

### Request example

The following example demonstrates a request for getting insights data. Replace the *applicationId* value with the Store ID for your app.

```syntax
GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/insights?applicationId=9NBLGGGZ5QDR&startDate=6/1/2018&endDate=6/15/2018&filter=dataType eq 'acquisition' or dataType eq 'health' HTTP/1.1
Authorization: Bearer <your access token>
```
## Response
### Response body
| Value | Type | Description |
|------------|--------|-------------------------------------------------------|
| Value | array | An array of objects that contain insights data for the app. For more information about the data in each object, see the [Insight values](#insight-values) section below. |
| TotalCount | int | The total number of rows in the data result for the query. |
### Insight values
Elements in the *Value* array contain the following values.
| Value | Type | Description |
|---------------------|--------|-------------------------------------------|
| applicationId | string | The Store ID of the app for which you are retrieving insights data. |
| insightDate | string | The date on which we identified the change in a specific metric. This date represents the end of the week in which we detected a significant increase or decrease in a metric compared to the week before that. |
| dataType | string | One of the following strings that specifies the general analytics area that this insight describes:<p/><ul><li><strong>acquisition</strong></li><li><strong>health</strong></li><li><strong>usage</strong></li></ul> |
| insightDetail | array | One or more [InsightDetail values](#insightdetail-values) that represent the details for current insight. |
### InsightDetail values
| Value | Type | Description |
|---------------------|--------|-------------------------------------------|
| FactName | string | One of the following values that indicates the metric that the current insight or current dimension describes, based on the **dataType** value.<ul><li>For **health**, this value is always **HitCount**.</li><li>For **acquisition**, this value is always **AcquisitionQuantity**.</li><li>For **usage**, this value can be one of the following strings:<ul><li><strong>DailyActiveUsers</strong></li><li><strong>EngagementDurationMinutes</strong></li><li><strong>DailyActiveDevices</strong></li><li><strong>DailyNewUsers</strong></li><li><strong>DailySessionCount</strong></li></ul></ul> |
| SubDimensions | array | One or more objects that describe a single metric for the insight. |
| PercentChange | string | The percentage that the metric changed across your entire customer base. |
| DimensionName | string | The name of the metric described in the current dimension. Examples include **EventType**, **Market**, **DeviceType**, **PackageVersion**, **AcquisitionType**, **AgeGroup** and **Gender**. |
| DimensionValue | string | The value of the metric that is described in the current dimension. For example, if **DimensionName** is **EventType**, **DimensionValue** might be **crash** or **hang**. |
| FactValue | string | The absolute value of the metric on the date the insight was detected. |
| Direction | string | The direction of the change (**Positive** or **Negative**). |
| Date | string | The date on which we identified the change related to the current insight or the current dimension. |
### Response example
The following example demonstrates an example JSON response body for this request.
```json
{
"Value": [
{
"applicationId": "9NBLGGGZ5QDR",
"insightDate": "2018-06-03T00:00:00",
"dataType": "health",
"insightDetail": [
{
"FactName": "HitCount",
"SubDimensions": [
{
"FactName:": "HitCount",
"PercentChange": "21",
"DimensionValue:": "DE",
"FactValue": "109",
"Direction": "Positive",
"Date": "6/3/2018 12:00:00 AM",
"DimensionName": "Market"
}
],
"DimensionValue": "crash",
"Date": "6/3/2018 12:00:00 AM",
"DimensionName": "EventType"
},
{
"FactName": "HitCount",
"SubDimensions": [
{
"FactName:": "HitCount",
"PercentChange": "71",
"DimensionValue:": "JP",
"FactValue": "112",
"Direction": "Positive",
"Date": "6/3/2018 12:00:00 AM",
"DimensionName": "Market"
}
],
"DimensionValue": "hang",
"Date": "6/3/2018 12:00:00 AM",
"DimensionName": "EventType"
},
],
"insightId": "9CY0F3VBT1AS942AFQaeyO0k2zUKfyOhrOHc0036Iwc="
}
],
"@nextLink": null,
"TotalCount": 2
}
```

## Related topics

* [Insights report](../publish/insights-report.md)
* [Access analytics data using Microsoft Store services](access-analytics-data-using-windows-store-services.md)
Loading

0 comments on commit edc2fec

Please sign in to comment.