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 web properties

Each Analytics account may have multiple web properties. You can get a list of all of them across all your Analytics accounts as:

foreach (AnalyticsWebProperty webProperty in analytics.GetWebProperties().Items) {
    string webPropertyId = webProperty.Id;
    string webPropertyName = webProperty.Name;
}

Or for a specific Analytics account as:

foreach (AnalyticsWebProperty webProperty in analytics.GetWebProperties(accountId).Items) {
    string webPropertyId = webProperty.Id;
    string webPropertyName = webProperty.Name;
}