You are here

public function GoogleAnalyticsCounterFeed::generateAuthHeader in Google Analytics Counter 7.3

OAuth step #2: Authorize request token. Generate authorization token header for all requests

Return value

Array

6 calls to GoogleAnalyticsCounterFeed::generateAuthHeader()
GoogleAnalyticsCounterFeed::queryAccounts in ./google_analytics_counter_oauth2.lib.inc
Query Management API - Accounts.
GoogleAnalyticsCounterFeed::queryGoals in ./google_analytics_counter_oauth2.lib.inc
Query Management API - Goals.
GoogleAnalyticsCounterFeed::queryProfiles in ./google_analytics_counter_oauth2.lib.inc
Query Management API - Profiles.
GoogleAnalyticsCounterFeed::queryReportFeed in ./google_analytics_counter_oauth2.lib.inc
Query and sanitize report data.
GoogleAnalyticsCounterFeed::querySegments in ./google_analytics_counter_oauth2.lib.inc
Query Management API - Segments.

... See full list

File

./google_analytics_counter_oauth2.lib.inc, line 223
Provides the Google Analytics Counter Feed object type and associated methods. Most of the Google Analytics authentication process is taken over from http://drupal.org/project/google_analytics_reports because all we need here is its Google Analytics…

Class

GoogleAnalyticsCounterFeed
GoogleAnalyticsCounterFeed class to authorize access to and request data from the Google Analytics Core Reporting API.

Code

public function generateAuthHeader($token = NULL) {
  if ($token == NULL) {
    $token = $this->access_token;
  }
  return array(
    'Authorization' => 'Bearer ' . $token,
  );
}