You are here

public function GoogleAnalyticsCounterFeed::queryGoals in Google Analytics Counter 8.3

Query Management API - Goals.

This method is not in use.

Parameters

array $params:

array $cache_options:

Return value

$this

Throws

\GuzzleHttp\Exception\GuzzleException

File

src/GoogleAnalyticsCounterFeed.php, line 519

Class

GoogleAnalyticsCounterFeed
Authorize access and request data from Google Analytics Core Reporting API.

Namespace

Drupal\google_analytics_counter

Code

public function queryGoals($params = array(), $cache_options = array()) {
  $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', $this
    ->generateAuthHeader(), $cache_options);
  return $this;
}