Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 885 Bytes

analytics_docs.md

File metadata and controls

48 lines (37 loc) · 885 Bytes

Analytics Documentation

Get Game Analytics

This is an example of how to get the downloadable CSV file containing analytics data:

client, err := helix.NewClient(&helix.Options{
    ClientID:        "your-client-id",
    UserAccessToken: "your-user-access-token",
})
if err != nil {
    // handle error
}

gameID := "493057"

resp, err := client.GetGameAnalytics(gameID)
if err != nil {
    // handle error
}

fmt.Printf("%+v\n", resp)

Get Extensions Analytics

client, err := helix.NewClient(&helix.Options{
    ClientID:        "your-client-id",
    UserAccessToken: "your-user-access-token",
})
if err != nil {
    // handle error
}

params := helix.ExtensionAnalyticsParams{
    ExtensionID: "abcd",
    Type:        "overview_v1",
}

resp, err := client.GetExtensionAnalytics(&params)
if err != nil {
    // handle error
}

fmt.Printf("%+v\n", resp)