Google Analytics is Google's service for measuring website and app traffic and engagement, organized into accounts and properties. The UnifyApps Google Analytics connector uses the Google Analytics Data API to run reports on a Google Analytics property, with the dimensions, metrics, date ranges and filters you choose, from workflows.
This guide covers every authentication type available on the connection form, and the actions supported, along with the Google Analytics scope each one needs.
Authentication
Before you begin, you should have the following information:
Connection name: a descriptive name such as MyAppGoogleAnalyticsIntegration, so the connection is easy to identify later.
Authentication type: select the type of authentication for connecting to your Google Analytics account:
Service Account
Single Sign-On(SSO)
Property ID: the numeric ID of the Google Analytics property to report on. It is required for every authentication type.
To find the Property ID, open Google Analytics, click Admin, select the property and open Property Settings. The numeric Property ID is shown there, for example 123456789.
Both authentication types request the scopes https://www.googleapis.com/auth/analytics.readonly and https://www.googleapis.com/auth/analytics automatically. There is no Scopes field on the form.
1. Service Account
Use this when a service account should act on behalf of a user in your Google Workspace domain through domain-wide delegation, so no user has to sign in.
Step 1: Create a service account in Google Cloud
In the Google Cloud Console, select or create a project, and enable the Google Analytics Data API under APIs & Services → Library.
Go to IAM & Admin → Service Accounts and click Create service account. Enter a name and click Done.
Open the service account and copy its Email. Click Show advanced settings and, under Domain-wide delegation, copy the Client ID used in the next step.
Go to the Keys tab → Add key → Create new key, choose JSON and click Create. The downloaded file holds the
client_emailandprivate_key. Store it securely.


Step 2: Give the service account domain-wide access
A Google Workspace super administrator opens the Admin console → Security → Access and data control → API controls.
Click Manage Domain Wide Delegation → Add new.
Enter the service account's client ID, add the scopes
https://www.googleapis.com/auth/analytics.readonlyandhttps://www.googleapis.com/auth/analytics, separated by commas, and click Authorize. See Control API access with domain-wide delegation for details.
Note: the connection reads data as the user you enter in User email. That user must belong to the Workspace domain where domain-wide delegation was granted and must have at least the Viewer role on the Google Analytics property (in Google Analytics, Admin → Property → Access management). Google says delegation changes can take up to 24 hours to apply.
Step 3: Create the connection in UnifyApps
Open Connections → New Connection → Google Analytics and enter a Connection name.
Select Service Account as the Authentication type.
Enter the Property ID.
Enter the Service account email (the
client_emailfrom the JSON key file).Enter the User email of the Workspace user the service account acts as.
Paste the Private key (the
private_keyfrom the JSON key file).Click Test Connection to validate the credentials, then click Create.
2. Single Sign-On(SSO)
Use this when you want to connect with your own Google account and do not need to create a Google Cloud app.
Enter a Connection name.
Select Single Sign-On(SSO) as the Authentication type.
Enter the Property ID.
Click Authorize. You are redirected to the Google sign-in page.
Sign in with a Google account that has at least the Viewer role on the property.
Review the permissions on the consent screen and click Allow.
You are redirected back to UnifyApps with a confirmation that the account is connected.
Actions
Scopes are shown in short form: analytics.readonly means https://www.googleapis.com/auth/analytics.readonly. The connection already requests both Analytics scopes.
Actions | Description | Scopes Required |
|---|---|---|
| Returns the analytics data for a report from Google Analytics. | analytics.readonly (or analytics) |