profile information (php)

Each response contains a group of parameters which indicate the Account, Web Property, and Profile this data belongs to. Each of these ID corresponds to various entities in the Management API (https:developers.google.comanalyticsdevguidesconfigmgmtv3 ) hierarchy. You can use these IDs to form Management API queries to get additional configuration information about the profile. For example, you can query the Management API Goals Collection (https:developers.google.comanalyticsdevguidesconfigmgmtv3mgmtJava#goals ) to see which Goals are active along with their configured goal names.

private function printProfileInformation(&$results) {
  $profileInfo = $results->getProfileInfo();

  $html = <<
Account ID               = {$profileInfo->getAccountId()}
Web Property ID          = {$profileInfo->getWebPropertyId()}
Internal Web Property ID = {$profileInfo->getInternalWebPropertyId()}
Profile ID               = {$profileInfo->getProfileId()}
Table ID                 = {$profileInfo->getTableId()}
Profile Name             = {$profileInfo->getProfileName()}
HTML;

  print $html;
}