依通路取得應用程式轉換Get app conversions by channel

在 Microsoft Store 分析 API 中使用此方法,以針對特定日期範圍與其他選擇性篩選器,取得應用程式的依通道彙總轉換。Use this method in the Microsoft Store analytics API to get aggregate conversions by channel for an application during a given date range and other optional filters.

  • 轉換表示客戶 (使用 Microsoft 帳戶登入) 已經新獲得您 App 的授權 (不論是付費或免費取得)。A conversion means that a customer (signed in with a Microsoft account) has newly obtained a license to your app (whether you charged money or you've offered it for free).
  • 通道是客戶到達您應用程式清單頁面的方法 (例如,透過 Microsoft Store 或自訂應用程式促銷活動)。The channel is the method in which a customer arrived at your app's listing page (for example, via the Store or a custom app promotion campaign).

您也可以在合作夥伴中心的 [收購] 報告中取得這項資訊。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/appchannelconversions

要求標頭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 conversion data. 舉例來說,Store 識別碼可以是「9WZDNCRFJ3Q8」。An example Store ID is 9WZDNCRFJ3Q8. Yes
startDatestartDate datedate 要擷取轉換資料之日期範圍的開始日期。The start date in the date range of conversion data to retrieve. 預設是 1/1/2016。The default is 1/1/2016. No
endDateendDate datedate 要擷取轉換資料之日期範圍的結束日期。The end date in the date range of conversion data to retrieve. 預設值是目前的日期。The default is the current date. No
toptop intint 在要求中傳回的資料列數目。The number of rows of data to return in the request. 如果未指定,最大值和預設值為 10000。The maximum value and the default value if not specified is 10000. 如果查詢中有更多資料列,回應主體將會包含您可以用來要求下一頁資料的下一頁連結。If there are more rows in the query, the response body includes a next link that you can use to request the next page of data. No
skipskip intint 在查詢中要略過的資料列數目。The number of rows to skip in the query. 使用此參數來瀏覽大型資料集。Use this parameter to page through large data sets. 例如,top=10000 且 skip=0 將擷取前 10000 個資料列的資料,top=10000 且 skip=10000 將擷取下 10000 個資料列的資料,以此類推。For example, top=10000 and skip=0 retrieves the first 10000 rows of data, top=10000 and skip=10000 retrieves the next 10000 rows of data, and so on. No
filterfilter 字串string 一或多個篩選回應本文的陳述式。One or more statements that filter the response body. 每個陳述式都可以使用 eqne 運算子,而陳述式之間可以使用 andor 來結合。Each statement can use the eq or ne operators, and statements can be combined using and or or. 您可以在篩選陳述式中指定下列字串。You can specify the following strings in the filter statements. 如需說明,請參閱本文的轉換值一節。For descriptions, see the conversion values section in this article.
  • applicationNameapplicationName
  • appTypeappType
  • customCampaignIdcustomCampaignId
  • referrerUriDomainreferrerUriDomain
  • channelTypechannelType
  • storeClientstoreClient
  • deviceTypedeviceType
  • 細分market

以下是 filter 參數範例:filter=deviceType eq 'PC'Here is an example filter parameter: filter=deviceType eq 'PC'.

No
aggregationLevelaggregationLevel 字串string 指定要擷取彙總資料的時間範圍。Specifies the time range for which to retrieve aggregate data. 可以是下列其中一個字串:dayweekmonthCan be one of the following strings: day, week, or month. 如果沒有指定,則預設為 If unspecified, the default is day. No
orderbyorderby 字串string 對每個轉換的結果資料值做出排序的陳述式。A statement that orders the result data values for each conversion. 語法為 orderby=field [order],field [order],...,其中 field 參數可以是下列其中一個字串︰The syntax is orderby=field [order],field [order],.... The field parameter can be one of the following strings:
  • datedate
  • applicationNameapplicationName
  • appTypeappType
  • customCampaignIdcustomCampaignId
  • referrerUriDomainreferrerUriDomain
  • channelTypechannelType
  • storeClientstoreClient
  • deviceTypedeviceType
  • 細分market

order 參數為選擇性,並可以是 ascdesc,以指定每個欄位的遞增或遞減順序。The order parameter is optional, and can be asc or desc to specify ascending or descending order for each field. 預設值是ascThe default is asc.

以下是範例orderby字串: orderby = date,市Here is an example orderby string: orderby=date,market

No
groupbygroupby 字串string 將資料彙總僅套用至指定欄位的陳述式。A statement that applies data aggregation only to the specified fields. 您可以指定下列欄位:You can specify the following fields:
  • datedate
  • applicationNameapplicationName
  • appTypeappType
  • customCampaignIdcustomCampaignId
  • referrerUriDomainreferrerUriDomain
  • channelTypechannelType
  • storeClientstoreClient
  • deviceTypedeviceType
  • 細分market

傳回的資料列將包含 groupby 參數中指定的欄位,以及下列項目:The returned data rows will contain the fields specified in the groupby parameter as well as the following:

  • datedate
  • applicationIdapplicationId
  • conversionCountconversionCount
  • clickCountclickCount

groupby 參數可以搭配 aggregationLevel 參數使用。The groupby parameter can be used with the aggregationLevel parameter. 例如: groupby = ageGroup、市場 & aggregationLevel = 周For example: groupby=ageGroup,market&aggregationLevel=week

No

要求範例Request example

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

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

GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/appchannelconversions?applicationId=9NBLGGGZ5QDR&startDate=1/1/2017&endDate=4/31/2017&skip=0&filter=market eq 'US'  HTTP/1.1
Authorization: Bearer <your access token>

回應Response

回應本文Response body

Value 類型Type 描述Description
Value arrayarray 物件陣列,內含應用程式的彙總轉換資料。An array of objects that contain aggregate conversion data for the app. 如需有關每個物件中資料的詳細資訊,請參閱下方的轉換值一節。For more information about the data in each object, see the conversion values section below.
@nextLink 字串string 如果還有其他資料頁面,此字串包含可以用來要求下一頁資料的 URI。If there are additional pages of data, this string contains a URI that you can use to request the next page of data. 例如,如果要求的 top 參數被設定為 10,但是查詢卻有超過 10 個資料列的轉換資料,就會傳回此值。For example, this value is returned if the top parameter of the request is set to 10 but there are more than 10 rows of conversion data for the query.
TotalCountTotalCount intint 查詢之資料結果的資料列總數。The total number of rows in the data result for the query.

轉換值Conversion values

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

Value 類型Type 描述Description
datedate 字串string 轉換資料之日期範圍中的第一個日期。The first date in the date range for the conversion data. 如果要求指定單一天數,此值便會是該日期。If the request specified a single day, this value is that date. 如果要求指定一週、一個月或其他日期範圍,此值便會是該日期範圍的第一個日期。If the request specified a week, month, or other date range, this value is the first date in that date range.
applicationIdapplicationId 字串string 您正在擷取轉換資料之應用程式的 Store 識別碼The Store ID of the app for which you are retrieving conversion data.
applicationNameapplicationName 字串string 您正在擷取轉換資料之應用程式的顯示名稱。The display name of the app for which you are retrieving conversion data.
appTypeappType 字串string 您正在擷取轉換資料之應用程式的產品類型。The type of the product for which you are retrieving conversion data. 對於此方法,唯一支援的值是 AppFor this method, the only supported value is App.
customCampaignIdcustomCampaignId 字串string 與應用程式相關聯之自訂應用程式促銷活動的識別碼字串。The ID string for a custom app promotion campaign that is associated with the app.
referrerUriDomainreferrerUriDomain 字串string 指定搭配已啟動之自訂應用程式促銷活動的應用程式清單所在的網域。Specifies the domain where the app listing with the custom app promotion campaign ID was activated.
channelTypechannelType 字串string 下列其中一個字串,指定轉換的通道︰One of the following strings that specifies the channel for the conversion:
  • CustomCampaignIdCustomCampaignId
  • Store TrafficStore Traffic
  • 其他Other
storeClientstoreClient 字串string 發生轉換之 Microsoft Store 的版本。The version of the Store where the conversion occurred. 目前唯一支援的值為 SFCCurrently, the only supported value is SFC.
deviceTypedeviceType 字串string 下列其中一個字串:One of the following strings:
  • PCPC
  • 來電Phone
  • 主控台-Xbox OneConsole-Xbox One
  • 主控台-Xbox 系列 XConsole-Xbox Series X
  • IoTIoT
  • 全息影像Holographic
  • UnknownUnknown
marketmarket 字串string 發生轉換之市場的 ISO 3166 國家/地區碼。The ISO 3166 country code of the market where the conversion occurred.
clickCountclickCount numbernumber 客戶點按您應用程式清單連結的數目。The number of customer clicks on your app listing link.
conversionCountconversionCount numbernumber 客戶轉換數。The number of customer conversions.

回應範例Response example

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

{
  "Value": [
    {
      "date": "2016-01-01",
      "applicationId": "9NBLGGGZ5QDR",
      "applicationName": "Contoso App",
      "appType": "App",
      "customCampaignId": "",
      "referrerUriDomain": "Universal Client Store",
      "channelType": "Store Traffic",
      "storeClient": "SFC",
      "deviceType": "PC",
      "market": "US",
      "clickCount": 7,
      "conversionCount": 0
    }
  ],
  "@nextLink": null,
  "TotalCount": 1
}