> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblUserStatisticsTrackStatistics

> XblUserStatisticsTrackStatistics

# XblUserStatisticsTrackStatistics

設定要即時追蹤的統計資料集合。此呼叫不會影響已在追蹤中的統計資料。

## 語法

```cpp theme={null}
HRESULT XblUserStatisticsTrackStatistics(  
         XblContextHandle xblContextHandle,  
         const uint64_t* xboxUserIds,  
         size_t xboxUserIdsCount,  
         const char* serviceConfigurationId,  
         const char** statisticNames,  
         size_t statisticNamesCount  
)  
```

### 參數

*xblContextHandle*   \_In\_\
類型：[XblContextHandle](/zh-TW/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

本機使用者的 XBOX Live 內容。

*xboxUserIds*   \_In\_\
類型：uint64\_t\*

要追蹤所提供統計資料的 XboxUserID 陣列。

*xboxUserIdsCount*   \_In\_\
類型：size\_t

xboxUserIds 陣列的長度。

*serviceConfigurationId*   \_In\_z\_\
類型：char\*

遊戲的服務設定識別碼 (SCID)。SCID 區分大小寫，因此請直接從 Partner Center 貼上。

*statisticNames*   \_In\_\
類型：char\*\*

將接收即時更新的統計資料名稱陣列。

*statisticNamesCount*   \_In\_\
類型：size\_t

statisticNames 陣列的長度。

### 傳回值

類型：HRESULT

此 API 作業的 HRESULT 傳回碼。

## 備註

更新會透過 XblStatisticChangedHandlers 傳遞。請注意，追蹤的統計資料集合可以獨立於處理常式進行更新。

## 需求

**標頭：** user\_statistics\_c.h

**程式庫：** Microsoft.Xbox.Services.14x.GDK.C.lib

## 另請參閱

[user\_statistics\_c](/zh-TW/reference/live/xsapi-c/user_statistics_c/user_statistics_c_members)


## Related topics

- [XblUserStatisticsStopTrackingStatistics](/zh-TW/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsstoptrackingstatistics.md)
- [XblUserStatisticsStopTrackingUsers](/zh-TW/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsstoptrackingusers.md)
- [XblUserStatisticsResult](/zh-TW/reference/live/xsapi-c/user_statistics_c/structs/xbluserstatisticsresult.md)
- [XblUserStatisticsGetMultipleUserStatisticsResult](/zh-TW/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetmultipleuserstatisticsresult.md)
- [XblUserStatisticsGetSingleUserStatisticAsync](/zh-TW/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetsingleuserstatisticasync.md)
