取得應用程式取得漏斗圖資料Get app acquisition funnel data

在 Microsoft Store 分析 API 中使用此方法,以針對特定日期範圍與其他選擇性篩選器,取得應用程式的取得漏斗資料。Use this method in the Microsoft Store analytics API to get acquisition funnel data for an application during a given date range and other optional filters. 您也可以在合作夥伴中心的 [收購] 報告中取得這項資訊。This information is also available in the Acquisitions report in Partner Center.

必要條件Prerequisites

若要使用這個方法,您必須先進行下列動作:To use this method, you need to first do the following:

  • 如果您尚未這樣做,請先完成 Microsoft Store 分析 API 的所有先決條件If you have not done so already, complete all the prerequisites for the Microsoft Store analytics API.
  • 取得 Azure AD 存取權杖以便用於這個方法的要求標頭。Obtain an Azure AD access token to use in the request header for this method. 在您取得存取權杖之後,您有 60 分鐘的使用時間,之後其便會到期。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 要求 URIRequest URI
GETGET https://manage.devcenter.microsoft.com/v1.0/my/analytics/funnel

要求標頭Request header

頁首Header 類型Type 描述Description
授權Authorization 字串string 必要。Required. Azure AD 存取權杖,形式為 Bearer <token>。The Azure AD access token in the form Bearer <token>.

要求參數Request parameters

參數Parameter 類型Type 說明Description 必要Required
applicationIdapplicationId 字串string 您想要擷取取得漏斗資料之應用程式的 Store 識別碼The Store ID of the app for which you want to retrieve acquisition funnel data. 舉例來說,Store 識別碼可以是「9WZDNCRFJ3Q8」。An example Store ID is 9WZDNCRFJ3Q8. Yes
startDatestartDate datedate 要擷取取得漏斗之日期範圍的開始日期。The start date in the date range of acquisition funnel data to retrieve. 預設值是目前的日期。The default is the current date. No
endDateendDate datedate 要擷取取得漏斗資料之日期範圍的結束日期。The end date in the date range of acquisition funnel data to retrieve. 預設值是目前的日期。The default is the current date. No
filterfilter 字串string 一或多個篩選回應中資料列的陳述式。One or more statements that filter the rows in the response. 如需更多資訊,請參閱下方的<篩選欄位>一節。For more information, see the filter fields section below. No

 

篩選欄位Filter fields

要求的 filter 參數包含在回應中篩選資料列的一或多個陳述式。The filter parameter of the request contains one or more statements that filter the rows in the response. 每個陳述式包含一個與 eqne 運算子關聯的欄位和值,而陳述式可以使用 andor 結合。Each statement contains a field and value that are associated with the eq or ne operators, and statements can be combined using and or or.

支援下列篩選欄位。The following filter fields are supported. 篩選 參數中的字串值必須由單引號括住。String values must be surrounded by single quotes in the filter parameter.

欄位Fields 描述Description
campaignIdcampaignId 與取得相關聯之自訂應用程式促銷活動的識別碼字串。The ID string for a custom app promotion campaign that is associated with the acquisition.
marketmarket 內含發生下載之市場的 ISO 3166 國家/地區碼的字串。A string that contains the ISO 3166 country code of the market where the acquisition occurred.
deviceTypedeviceType 下列其中一個字串,指定發生取得的裝置類型:One of the following strings that specifies the device type on which the acquisition occurred:
  • PCPC
  • 來電Phone
  • 主控台-Xbox OneConsole-Xbox One
  • 主控台-Xbox 系列 XConsole-Xbox Series X
  • IoTIoT
  • 全息影像Holographic
  • UnknownUnknown
ageGroupageGroup 下列其中一個字串,指定完成取得之使用者的年齡層:One of the following strings that specifies the age group of the user who completed the acquisition:
  • 0 – 170 – 17
  • 18 – 2418 – 24
  • 25 – 3425 – 34
  • 35 – 4935 – 49
  • 50 或以上50 or over
  • UnknownUnknown
gendergender 下列其中一個字串,指定完成取得之使用者的性別:One of the following strings that specifies the gender of the user who completed the acquisition:
  • MM
  • FF
  • UnknownUnknown

要求範例Request example

下列範例示範數個取得應用程式取得漏斗資料的要求。The following example demonstrates several requests for getting acquisition funnel data for an app. applicationId 值取代為您 App 的 Store 識別碼。Replace the applicationId value with the Store ID for your app.

GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/funnel?applicationId=9NBLGGGZ5QDR&startDate=1/1/2017&endDate=2/1/2017  HTTP/1.1
Authorization: Bearer <your access token>

GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/funnel?applicationId=9NBLGGGZ5QDR&startDate=8/1/2016&endDate=8/31/2016&filter=market eq 'US' and gender eq 'm'  HTTP/1.1
Authorization: Bearer <your access token>

回應Response

回應本文Response body

Value 類型Type 描述Description
Value arrayarray 物件陣列,內含應用程式的取得漏斗資料。An array of objects that contain acquisition funnel data for the app. 如需有關每個物件中資料的詳細資訊,請參閱下方的漏斗值一節。For more information about the data in each object, see the funnel values section below.
TotalCountTotalCount intint Value 陣列中的物件總數。The total number of objects in the Value array.

漏斗值Funnel values

Value 陣列中的物件包含下列值。Objects in the Value array contain the following values.

Value 類型Type 描述Description
MetricTypeMetricType 字串string 下列其中一個字串,指定此物件中包含的漏斗資料類型One of the following strings that specifies the type of funnel data that is included in this object:
  • PageViewPageView
  • 擷取Acquisition
  • 安裝Install
  • 使用量Usage
UserCountUserCount 字串string 執行 MetricType 值指定之漏斗步驟的使用者數。The number of users who performed the funnel step specified by the MetricType value.

回應範例Response example

下列範例針對此要求示範範例 JSON 回應主體。The following example demonstrates an example JSON response body for this request.

{
  "Value": [
    {
      "MetricType": "PageView",
      "UserCount": 100
    },
    {
      "MetricType": "Acquisition",
      "UserCount": 80
    },
    {
      "MetricType": "Install",
      "UserCount": 50
    },
    {
      "MetricType": "Usage",
      "UserCount": 10
    }
  ],
  "TotalCount": 4
}