Setting up a Google Service Account

The preferred long-term authentication method for Google services is the Service Account Credentials method. This section deals with setup. The collectors google-analytics, google-bigquery, and google-webmasters use this method.

Creating a Service Account

  1. Go to: https://console.cloud.google.com/apis/credentials
  2. Click “Create Credentials”, choose “Service Account Key”.

Then, follow with the specific instructions below for your collector.

Specific setup for google-analytics

  1. Go to dashboard https://console.cloud.google.com/apis/dashboard and check that Google Analytics Reporting API is enabled for this project
  2. Otherwise click Enable API -> Search for the API Name Google Analytics Reporting API and click it -> Click the button Enable.

Specific setup for google-bigquery

  1. Go to dashboard https://console.cloud.google.com/apis/dashboard and check that Google BigQuery API is enabled for this project

  2. If not, click Enable API and enable BigQuery API for this project.

  3. Grant to the Service Account IAM Permissions to create queries on their behalf, by giving it the role “user”:

    1. Go to the IAM console https://console.cloud.google.com/iam-admin/iam
    2. Click the Add button. a dialog will open.
    3. Fill the email of the service account.
    4. Select the role BigQuery / BigQuery User.

Specific setup for google-webmasters

  1. Go to dashboard https://console.cloud.google.com/apis/dashboard and check that Google Search Console API is enabled for this project
  2. Otherwise click Enable API -> Search for the API Name Google Search Console API and click it -> Click the button Enable.