Skip to main content

Google Analytics

Read Google Analytics 4 properties, traffic and conversion reports.

Connect it with: Sign in (OAuth). Google Analytics's own documentation: https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1beta/accountSummaries/list.

What agents can do​

Connect Google Analytics so the agents working your tasks can reach it. With it connected, they can:

  • List the Analytics accounts and GA4 properties the connected Google account can see.
  • Run Data API reports: sessions, users, page views, events and conversions by date, page, source or country.
  • Compare a period against the previous one to check whether a release or a campaign moved traffic.
  • Read realtime reports to confirm a new page or event is firing after a deploy.

Before you start​

  • A Google account with at least Viewer access to the Google Analytics 4 property agents should read (Admin > Property access management in Google Analytics).
  • A GA4 property. Universal Analytics properties stopped processing data in 2024 and are not supported by these APIs.
  • A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.

Connect with Google Analytics​

This is the quickest way in: you sign in to Google Analytics and approve what Jaah asks for. You never copy a key.

  1. In Jaah, open Secrets and select New.
  2. Search for Google Analytics and select its card.
  3. Give the secret a name you will recognize, such as the account or workspace it reaches, and choose who can use it (see Who can use it).
  4. Select Connect Google Analytics. Google Analytics's sign-in window opens.
  5. Sign in to Google Analytics if asked, check the access listed, and approve it.
  6. You land back in Jaah on the new secret, which reads Connected once its test passes.

If the button reads Jaah app not configured, this Jaah has no app registered at Google Analytics yet. Use your own OAuth app until it does (see Use your own OAuth app).

Scopes Jaah requests​

Jaah asks Google Analytics for these scopes, and no others. A scope marked optional is a checkbox on the Connect screen: untick it and agents simply cannot do that part.

ScopeWhy Jaah asks for itRequired
https://www.googleapis.com/auth/analytics.readonlyRead your Analytics accounts, properties and reports, so agents can answer traffic and conversion questions. Read only: agents cannot change settingsYes

Connect with an API key​

Google Analytics has no API key option in Jaah: connect with the sign-in above.

Use your own OAuth app​

Register your own OAuth app at Google Analytics when your company requires apps it controls, or before this Jaah has an app registered there.

  1. Create an OAuth app in Google Analytics's developer console, https://console.cloud.google.com/auth/clients (Google Analytics's documentation).
  2. Set its redirect URI to https://app.jaah.ai/api/credentials/connect/callback (on your own Jaah, its console address followed by /api/credentials/connect/callback).
  3. Give it the scopes in Scopes Jaah requests.
  4. Copy its client ID and client secret.
  5. In Jaah, start a new Google Analytics secret, select Use your own OAuth app, paste both values and select Connect Google Analytics.

The client secret is stored with the connection, encrypted, like any other secret value.

Test the connection​

Select Test on the secret. Jaah calls Google Analytics's API once (GET https://analyticsadmin.googleapis.com/v1beta/accountSummaries?pageSize=1) with the stored values, and shows who it answered as, or which value Google Analytics refused and the status it answered. Jaah also tests automatically when you save or reconnect.

The last result and its time stay on the secret's page, so you can see whether it still works without testing again.

Who can use it​

Every secret has an owner, and the owner decides who can use it:

  • Personal — only your own tasks can use it. This is the default.
  • Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
  • Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.

More on owners and access: How secrets work.

Use it in an agent session​

An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:

  • org/<name> for an organization secret,
  • projects/<project>/<name> for one attached to a project,
  • me/<name> for your personal one.

A signed-in connection hands the agent a live access_token, with access_token_expires_at. Jaah refreshes it before it expires, so an agent never handles a refresh token.

Tell the agent in your task description which secret to use, for example “use the Google Analytics secret org/google-analytics”.

Manage, rotate or disconnect​

Everything is on the secret's page under Secrets:

  • Reconnect: when Google Analytics ends the grant (a password change, a revoked app, an expired refresh), the secret shows Needs reconnect. Select Reconnect and sign in again; agents get the new token on their next call.
  • Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at Google Analytics's side too, remove Jaah's access in your Google Account > Security > Your connections to third-party apps & services (myaccount.google.com/connections).

Limitations​

  • Read only: agents cannot create properties, edit data streams, change conversions or manage users.
  • Reports follow Google's Data API quotas per property (tokens per hour and per day); a busy agent can hit them and must wait.
  • Data is subject to Google's own processing delay: standard reports can lag by up to a day, realtime covers the last 30 minutes.
  • Agents can do only what the connected Google Analytics account and its granted scopes allow.

Troubleshooting​

Test says Google Analytics rejected the access token (401)

The grant was revoked at myaccount.google.com > Security > Third-party apps, or the password changed. Select Reconnect and approve again.

Test says Connected to Google Analytics - credentials accepted, with no account named

The connected Google account has no Analytics access. In Google Analytics open Admin > Account access management and add that account as a Viewer, then test again.

An agent gets 403 PERMISSION_DENIED on one property

The account can see other properties but not this one. Add it under Admin > Property access management for that property.

Google shows This app isn't verified during Connect

This Jaah's Google app is still in verification. Select Advanced > Go to Jaah to continue, or connect with your own OAuth app.

Still stuck? Select Test and read the result: it names the value Google Analytics refused and the status it answered.

FAQ​

Which Google account should I connect?

One that can read the properties agents need. A shared analytics account is better than a personal one, because the connection stops working if that person leaves.

Can agents see personal data about visitors?

No. The Data API returns aggregated reports only; Google Analytics does not expose individual visitors through it.

Does this connection also cover Search Console?

No. Google Search Console is its own integration with its own scope; connect it separately.

Can Jaah or an admin see the key or token?

No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.

Can I connect more than one Google Analytics account?

Yes. Add one secret per account, each with its own name, and tell the agent which one to use.