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
- Create a service account for your application, according to the service’s required credentials.
- Enable the roles listed in the table below for the service account to enable Anodot to collect the required data.
Service Required Roles Google Analytics Read & Analyze Google BigQuery BigQuery Data Viewer
BigQuery UserGoogle Cloud Storage Storage Object Viewer
Firebase Viewer
Service Usage Consumer - Save the exported credentials to a JSON file.
- Choose the JSON file when you create the Anodot Data Source.
EXAMPLE: Setting up a Service for Google BigQuery
Create a Service Account
- Go to Google Cloud Platform: Credentials
- Choose the relevant google project
- Click Create Credentials, and then choose Service Account Key.
Granting permissions to the Service Account
- Go to the dashboard:
- Check that Google BigQuery API is enabled for this project.
- If not, click Enable API and enable BigQuery API for this project.
- Grant the Service Account the necessary IAM Permissions to create queries on your behalf:
- Go to Google Cloud Platform: IAM & Admin.
- Click the Add button.
- In the displayed dialog, enter the email of the service account.
- Select both roles:
- BigQuery -> BigQuery User, and
- BigQuery -> BigQuery Data Viewer
- Create a key, save it as a JSON credentials file.
EXAMPLE 2: Setting up a Service for Google Analytics
Create a Service Account
- Go to Google Cloud Platform: Credentials
- Choose the relevant google project
- Click Create Credentials, and then choose Service Account Key.
Granting permissions to the Service Account
- Go to the dashboard:
- Check that Google Analytics API and Google Analytics reporting API are enabled for this project.
- If not, click Enable API and enable them for this project.
- Grant the Service Account the necessary IAM Permissions to create queries on your behalf:
- Go to Google Cloud Platform: IAM & Admin.
- Click the Add button.
- In the displayed dialog, enter the email of the service account.
- Select a role that contains this permission:
- firebaseanalytics.resources.googleAnalyticsReadAndAnalyze
- A built in role with that permission is "Firebase Analytics Viewer"
- Create a key, save it as a JSON credentials file.