Method: stats.get
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
傳回目前驗證使用者的這個應用程式的參與度和支出統計資料。
HTTP 要求
GET https://games.googleapis.com/games/v1/stats
回應主體
第三方統計資料資源。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"churn_probability": number,
"num_purchases": integer,
"spend_percentile": number,
"days_since_last_played": integer,
"num_sessions": integer,
"num_sessions_percentile": number,
"avg_session_length_minutes": number,
"spend_probability": number,
"high_spender_probability": number,
"total_spend_next_28_days": number,
"kind": string
} |
欄位 |
churn_probability |
number
玩家在隔天未回訪玩遊戲的機率。例如:0、0.1、0.5、...、1.0。如果資訊不足,則不會顯示任何資訊。
|
num_purchases |
integer
玩家在這款遊戲中完成的應用程式內購次數。例如:0、1、5、10、... 。如果資訊不足,則不會顯示任何資訊。
|
spend_percentile |
number
玩家在這款遊戲中的約略消費百分位數。例如:0、0.25、0.5、0.75。如果資訊不足,則不會顯示任何資訊。
|
days_since_last_played |
integer
玩家上次玩這款遊戲後經過的天數。例如:0、1、5、10、... 。如果資訊不足,則不會顯示任何資訊。
|
num_sessions |
integer
過去 28 天內玩家工作階段的大致數量,工作階段會在玩家連上 Play 遊戲服務時開始,並在中斷中斷後結束。例如:0、1、5、10、... 。如果資訊不足,則不會顯示任何資訊。
|
num_sessions_percentile |
number
過去 30 天內玩家工作階段的近似值,工作階段會在玩家連線至 Play 遊戲服務時開始,並在中斷中斷後結束。例如:0、0.25、0.5、0.75。如果資訊不足,則不會顯示任何資訊。
|
avg_session_length_minutes |
number
玩家平均工作階段長度,以分鐘為單位。例如:1、30、60... .如果資訊不足,則不會顯示任何資訊。
|
spend_probability |
number
玩家未來 7 天內購買遊戲的機率。例如:0、0.25、0.50、0.75。如果資訊不足,則不會顯示任何資訊。
|
high_spender_probability |
number
玩家消費金額超過門檻金額的機率。例如:0、0.25、0.50、0.75。如果資訊不足,則不會顯示任何資訊。
|
total_spend_next_28_days |
number
玩家未來 28 天內會花費的預測支出金額。例如:1、30、60... .如果資訊不足,則不會顯示任何資訊。
|
kind |
string
專門用於識別這項資源的類型。值一律為固定字串 games#statsResponse 。
|
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
詳情請參閱 OAuth 2.0 總覽。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Method: stats.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.PlayerStats.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReturns engagement and spend statistics in this application for the currently authenticated user.\n\n### HTTP request\n\n`GET https://games.googleapis.com/games/v1/stats`\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nA third party stats resource.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"churn_probability\": number, \"num_purchases\": integer, \"spend_percentile\": number, \"days_since_last_played\": integer, \"num_sessions\": integer, \"num_sessions_percentile\": number, \"avg_session_length_minutes\": number, \"spend_probability\": number, \"high_spender_probability\": number, \"total_spend_next_28_days\": number, \"kind\": string } ``` |\n\n| Fields ||\n|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `churn_probability` | `number` The probability of the player not returning to play the game in the next day. E.g., 0, 0.1, 0.5, ..., 1.0. Not populated if there is not enough information. |\n| `num_purchases` | `integer` Number of in-app purchases made by the player in this game. E.g., 0, 1, 5, 10, ... . Not populated if there is not enough information. |\n| `spend_percentile` | `number` The approximate spend percentile of the player in this game. E.g., 0, 0.25, 0.5, 0.75. Not populated if there is not enough information. |\n| `days_since_last_played` | `integer` Number of days since the player last played this game. E.g., 0, 1, 5, 10, ... . Not populated if there is not enough information. |\n| `num_sessions` | `integer` The approximate number of sessions of the player within the last 28 days, where a session begins when the player is connected to Play Games Services and ends when they are disconnected. E.g., 0, 1, 5, 10, ... . Not populated if there is not enough information. |\n| `num_sessions_percentile` | `number` The approximation of the sessions percentile of the player within the last 30 days, where a session begins when the player is connected to Play Games Services and ends when they are disconnected. E.g., 0, 0.25, 0.5, 0.75. Not populated if there is not enough information. |\n| `avg_session_length_minutes` | `number` Average session length in minutes of the player. E.g., 1, 30, 60, ... . Not populated if there is not enough information. |\n| `spend_probability` | `number` The probability of the player going to spend the game in the next seven days. E.g., 0, 0.25, 0.50, 0.75. Not populated if there is not enough information. |\n| `high_spender_probability` | `number` The probability of the player going to spend beyond a threshold amount of money. E.g., 0, 0.25, 0.50, 0.75. Not populated if there is not enough information. |\n| `total_spend_next_28_days` | `number` The predicted amount of money that the player going to spend in the next 28 days. E.g., 1, 30, 60, ... . Not populated if there is not enough information. |\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#statsResponse`. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/games`\n- `\n https://www.googleapis.com/auth/games_lite`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]