Google Service Accounts

This article describes the Anodot use of Google service accounts.

For more information on Google service accounts, see Understand Service Accounts.


Authenticating with a Service Account

  1. Create a service account for your application, according to the service’s required credentials.

  2. Enable the roles listed in the table below for the service account to enable Anodot to collect the required data.

    ServiceRequired Roles
    Google AnalyticsRead & Analyze
    Google BigQueryBigQuery Data Viewer
    BigQuery User
    Google Cloud StorageStorage Object Viewer
    Firebase Viewer
    Service Usage Consumer
  3. Save the exported credentials to a JSON file.

  4. Choose the JSON file when you create the Anodot Data Source.


EXAMPLE 1: Setting up a Service for Google BigQuery

Create a Service Account

  1. Go to Google Cloud Platform: Credentials
  2. Choose the relevant google project
  3. Click Create Credentials, and then choose Service Account Key.

Granting permissions to the Service Account

  1. Go to the dashboard:
    1. Check that Google BigQuery API is enabled for this project.
    2. If not, click Enable API and enable BigQuery API for this project.
  2. Grant the Service Account the necessary IAM Permissions to create queries on your behalf:
    1. Go to Google Cloud Platform: IAM & Admin.
    2. Click the Add button.
    3. In the displayed dialog, enter the email of the service account.
    4. Select both roles:
      1. BigQuery -> BigQuery User, and
      2. BigQuery -> BigQuery Data Viewer
  3. Create a key, save it as a JSON credentials file.


EXAMPLE 2: Setting up a Service for Google Analytics

Create a Service Account

  1. Go to Google Cloud Platform: Credentials
  2. Choose the relevant google project
  3. Click Create Credentials, and then choose Service Account Key.

Granting permissions to the Service Account

  1. Go to the dashboard:
    1. Check that Google Analytics API and Google Analytics reporting API are enabled for this project.
    2. If not, click Enable API and enable them for this project.
  2. Grant the Service Account the necessary IAM Permissions to create queries on your behalf:
    1. Go to Google Cloud Platform: IAM & Admin.
    2. Click the Add button.
    3. In the displayed dialog, enter the email of the service account.
    4. Select a role that contains this permission:
      1. firebaseanalytics.resources.googleAnalyticsReadAndAnalyze
      2. A built in role with that permission is "Firebase Analytics Viewer"
  3. Create a key, save it as a JSON credentials file.

Did this page help you?