Google Analytics Management

The Management API provides read-only access to the configuration information about Google Analytics users. The API exposes related configuration data as entities. For example a profile is an entitiy. With Management you can:

  • List all the Account, Web Property and Profile information for a user.
  • Retrieve a Profile ID to use with the Core Reporting API.
  • Determine which goals are active and access their configured names.
  • Retrieve a user's Custom Segments to apply them to Core Reporting API queries.
Figure 1. Management Methods
Method Arguments Returns Description
$management->setStartIndex($startIndex);
  1. integer
Eden_Google_Analytics_Management Set start index
$management->setMaxResults($maxResults);
  1. integer
Eden_Google_Analytics_Management Set start index
$management->getAccounts(); none array Returns all accounts to which the user has access.
$management->getWebProperties($accountId = self::ALL);
  1. string
array Returns web properties to which the user has access
$management->getProfiles($accountId = self::ALL, $webPropertyId = self::ALL);
  1. string
  2. string
array Returns lists of profiles to which the user has access
$management->getGoals($accountId = self::ALL, $webPropertyId = self::ALL, $profileId = self::ALL);
  1. string
  2. string
  3. string
array Returns lists of goals to which the user has access
$management->getSegments(); none array Returns lists of advanced segments to which the user has access

© 2012 Openovate Labs. All rights reserved.