The page has been marked as outdated. This generally means that the page was written for either a previous version of the package or a previous version of the underlying API(s).

Getting a list of Analytics accounts

A Google account may be associated with multiple Analytics accounts. You can get a list of them as:

AnalyticsAccountsResponse response = analytics.GetAccounts();

foreach (AnalyticsAccount account in response.Items) {
                
    string accountId = account.Id;
    string accountName = account.Name;
                
}