You are here

public function GoogleAnalyticsReportsApiFeed::queryGoals in Google Analytics Reports 8.3

Query Management API - Goals.

File

google_analytics_reports_api/src/GoogleAnalyticsReportsApiFeed.php, line 599

Class

GoogleAnalyticsReportsApiFeed
Class GoogleAnalyticsReportsApiFeed.

Namespace

Drupal\google_analytics_reports_api

Code

public function queryGoals($params = [], $cache_options = []) {
  $params += [
    'account-id' => '~all',
    'web-property-id' => '~all',
    'profile-id' => '~all',
  ];
  $this
    ->setQueryPath('management/accounts/' . $params['account-id'] . '/webproperties/' . $params['web-property-id'] . '/profiles/' . $params['profile-id'] . '/goals');
  $this
    ->query($this->queryPath, $params, 'GET', $cache_options);
  return $this;
}