Google Analytics
⛔ Retired
[!CAUTION] This connector has been retired. Universal Analytics was shut down on July 1, 2024. The Reporting API no longer returns data and all historical data has been deleted by Google.
Official documentation: Google Analytics API docs
Authentication
Google Analytics uses API key authentication.
- Go to the Connections page and create a New Connection
- Select Google Analytics Reporting API from the Connector dropdown
- Enter a Connection name
- Fill in the following credentials:
| Field | Required |
|---|---|
| Client Email | ✅ |
| Private Key | ✅ |
In order to start using the hibase connector to the Google Analytics API (v4), you first need to set up a Service Account within your Google Analytics account.
Navigate to your Google APIs Dashboard and check whether a Project already exsists for your app
If a project was not already set up, you can do so through this Setup tool
Navigate to the Google APIs Library and activate the Google Analytics Reporting API for the project if it was not already activated
Navigate to the Credentials tab and select Create credentials -> Service account key
Save your credentials as JSON. Warning: Store this file securely as this is the only time you will be able to download it
You will now have to add the newly created user to your Google Analytics account. Sign in, click on Admin in the bottom-left corner and then on User Management under the account / property or view you want to give hibase access to
In the Account users list, click on + in the top-right corner and then on Add new users
As an email address, enter the
client_emailthat you see in the JSON file saved at step 5. As permissions, select Read & AnalyzeBack to hibase, add a new Google Analytics API (v4) Connector and fill your client email and private key, which you can find in the downloaded JSON file
Important: make sure you correctly add line breaks to your private key, by substituting any occurrence of \n in the JSON file with an actual line break. From:
-----BEGIN PRIVATE KEY-----\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nXXXXXXXXXXXXX...
... to:
-----BEGIN PRIVATE KEY-----
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXX...
- Save the connector and you are good to go
In case you experience issues querying the API, check again the steps above and especially that you copied your private key correctly (step 6). You can edit the Connector you just added at any time and overwrite the credentials you originally provided.
Endpoints
Batch Reports (API docs)
Execute a Google Analytics Reporting API v4 batch request with a custom report definition.
| Parameter | Description | Required |
|---|---|---|
query |
JSON-encoded report request body containing dimensions, metrics, date ranges, and filters. See the Core Reporting API documentation for query structure. | ✅ |
Returned Data: All fields from the API response are automatically flattened into columns.