Connecting Google Analytics
You can add your own Google Analytics 4 connection so that Cora can read your reports in the missions you choose. It is read-only. Cora can look at reports for the properties you share with her, and she cannot change anything in Google Analytics.
The connection is yours. You decide which missions Cora may use it in, and nobody else can use it. See Personal connections for the rules. Cora AI runs Google’s own Google Analytics server for you, so there is nothing to host or install. You only create a key in Google and add it in the console. This page uses an invented company, Kestrel Cycles, and its analyst, Leah Thompson.
What you need
Section titled “What you need”- MCP turned on for the organisation (see Connecting an MCP server). An org admin does that once.
- Someone who can create a service account in your Google Cloud project, and an admin of the Google Analytics property.
- The Google Analytics 4 connection turned on by the operator. Until then it says “Not available yet”.
Step 1: make a service account in Google
Section titled “Step 1: make a service account in Google”A service account is a robot login for one job. Leah makes one for Cora in the Google Cloud console:
- Pick the Google Cloud project to use (or create one, for example
kestrel-analytics). - Turn on the two Google Analytics APIs: open APIs & Services, then Library, search for Google Analytics Data API and choose Enable, then do the same for Google Analytics Admin API.
- Open IAM & Admin, then Service Accounts, and choose + Create service account. Give it a name such as
cora-ga4and choose Done. It needs no Google Cloud roles. Its email looks likecora-ga4@kestrel-analytics.iam.gserviceaccount.com. - Open the new service account, choose the Keys tab, then Add key, Create new key, JSON and Create. A small file ending in
.jsondownloads. Keep it safe: it is the key you add in step 3, and Google cannot show it again.
The service account can only see what its Google admin shares with it, so a connection never sees more than the properties you chose to share.
Step 2: give the account access to your property
Section titled “Step 2: give the account access to your property”In Google Analytics, open Admin, then Property access management, choose + Add users, and add the service account’s email with the Viewer role. Do this on each property Cora should read. Viewer is enough, and it is all Cora asks for.
Step 3: add the connection in the console
Section titled “Step 3: add the connection in the console”- Open Connections on the left rail and press Connect beside Google Analytics 4 (it says Your Google key).
- In the Account section, choose Add your key. The address is filled in for you (“Hosted by Cora”) and the sign-in is fixed to Google service account.
- Choose the key file. Your browser reads it and sends it once. The page then shows only the account’s email, which is the one to add as Viewer in step 2.
- Choose Test connection. Cora signs in with the key and says how many properties the account can see, for example “Connected. 3 properties found.” If it finds none, the account has not been added as Viewer yet.
- Choose Add connection. Then, in the Shared with missions section, choose + Share in a mission. There is no approval role to pick, because this connection only reads, and reading never asks for approval.
You can have one Google Analytics 4 connection. To use another account, choose Replace key.
Step 4: share it in a mission
Section titled “Step 4: share it in a mission”On your connection, choose + Share in a mission and pick a mission you belong to. Cora can then read your reports in that mission, and in no other. You can also open a mission’s details (the Details button at the top right), choose the Tools tab, and under Connections choose Share mine next to Google Analytics 4.
A mission can use one Google Analytics 4 connection. If the mission already uses a colleague’s, the page says whose it is, and only they can stop sharing it. Choose Stop sharing at any time to take it back from a mission.
If you are an org admin you can instead choose Make available to the whole organisation on your connection. Mission members then switch it on or off in each mission, and Cora uses your key for everyone, so do this only for a service account meant for the team.
What Cora may do with each tool is set once on the connection, and the mission only shares it or stops sharing it (see Switching a connection on in a mission).
Step 5: ask Cora
Section titled “Step 5: ask Cora”In a mission where you shared the connection, ask Cora in the dialogue, for example:
- “How many sessions and users did we get last month, by channel?”
- “Which ten pages had the most views in the last 30 days?”
- “Compare conversions this month with the same month last year.”
Cora lists your properties if she needs to know which one to use, then reads the report and answers with the figures and the dates they cover. She can only read: she never changes anything in Google Analytics. If she says the mission has no Google Analytics 4 connection, go back to step 4.
What stays private
Section titled “What stays private”- The key is kept in one place. It goes straight to the secrets store and is never shown again. It is not in the database, a log, an audit entry, a prompt or Cora’s worker. To change it, choose Replace key and choose a new file.
- Only you can use it. No colleague can use your connection, and an org admin cannot either, unless you are an org admin yourself and choose to make it available to the whole organisation. Org admins can see who owns which connection and where it is shared, and can stop sharing or remove one for safety. They never see the key.
- Cora gets a short-lived pass, not the key. Before each connection, Cora AI’s API swaps the key for a one-hour Google token that can only read Google Analytics. Cora’s worker holds that token, together with a shared passcode for our own server, in memory for the step and nowhere else.
- Read-only. The token asks for Google’s read-only Google Analytics permission, and the server we run has no tool that changes anything.
- Closed to everyone else. The server we host only answers Cora AI’s own API. A Google token alone does not open it.
- If you leave, it goes. When you leave the organisation, your connections are removed and the keys deleted, and Cora says so in each mission that used one.
- Everything is on the record. Adding, sharing, stopping sharing and removing a connection, and every tool call, are in the audit log.
When it stops working
Section titled “When it stops working”If Google refuses the key, the connection shows Failing with a plain reason and you are told. The usual causes are a key that was deleted or turned off in Google, or a service account that was removed from the property. Add the account as Viewer again, or make a new key and choose Replace key. If Google simply does not answer for a moment, nothing is marked as failing and nobody is emailed. Cora tries again on her next step.
Coming next
Section titled “Coming next”Signing in as yourself with your own Google account, and tools that change things in Google Analytics, are not part of this step. See Personal connections for what is planned.