{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["platform-badges","admonition","img"]},"type":"markdown"},"seo":{"title":"Treasure AI Studio - Connect Google Analytics","description":"Connect Google Analytics to Treasure AI Studio so agents can read your GA4 reports and answer questions about traffic, pages, events, and conversions.","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"connect-google-analytics","__idx":0},"children":["Connect Google Analytics"]},{"$$mdtype":"Tag","name":"PlatformBadges","attributes":{"platforms":["Web","Desktop"]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Google Analytics connector lets Treasure AI Studio agents read your GA4 data during a chat. An agent can pull acquisition, page, event, and key-event reports for any property you have access to, build a custom report from whichever dimensions and metrics you name, and check who is on the site right now. Use it when a question about site behavior needs an answer next to the rest of your data — comparing the channels that drove a campaign's traffic against the segment that converted, for example — rather than a GA4 tab and an export."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This connection is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["read-only, and deliberately narrow"]},". The agent can read reports and the dimensions and metrics available to build them. It cannot change anything in Analytics, and it cannot read a property's configuration or administration. Treasure AI requests a read-only Google scope, so a write is refused by Google before it reaches your account, and the surface is narrowed further by account policy. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#what-the-agent-can-do"},"children":["What the Agent Can Do"]}," for the full list."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"New to connections?"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Read ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/connections"},"children":["Connections"]}," first for the general model — the difference between a connector and a connection, and the administrator vs. user roles. This page covers the Google Analytics-specific steps."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"objective","__idx":1},"children":["Objective"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enable the Google Analytics connector for your account and authorize a connection, so the agent can read GA4 reports for your properties during a chat."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Account administrator privileges in Treasure AI Studio — needed for Step 1 only (enabling the connector)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A Google account with access to at least one Google Analytics 4 property. The agent reads as this account, so its reach follows that account's own Analytics access — see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#what-the-agent-can-see"},"children":["What the Agent Can See"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The property is a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["GA4"]}," property. This connector uses Google's GA4 APIs; Universal Analytics properties are not supported"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"who-does-what","__idx":3},"children":["Who Does What"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Setting up Google Analytics touches two roles, each doing its part once. There is nothing to configure on the Google Cloud side — Treasure AI manages the OAuth application."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Role"},"children":["Role "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"44%","data-label":"What They Do"},"children":["What They Do "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"26%","data-label":"How Often"},"children":["How Often "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Treasure AI Studio administrator"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Adds the Google Analytics connector in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connector Settings"]}," and saves it. There are no fields to fill in."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Once for the organization"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Each member"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authorizes their own connection from ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connections"]},", choosing which Google account to use and approving the requested access."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Once per person"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There is no OAuth application to register, no service account to create and grant property access to, and no network policy rule to add. Each member's own Google account is the authorization."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1--enable-the-google-analytics-connector-administrator","__idx":4},"children":["Step 1 — Enable the Google Analytics Connector (Administrator)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure AI manages the Google OAuth application for this connector, so there is nothing to create in the Google Cloud console and no client ID or secret to enter. The configuration form is empty."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In Treasure AI Studio, open ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings → Connector Settings"]}," (under ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Organization"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Add Connector"]}," (or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Add your first connector"]},") and choose ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Google Analytics"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save"]},". There are no fields to fill in. The connector is saved already enabled, so Google Analytics appears under ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Available"]}," on every user's ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connections"]}," tab straight away."]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-connector-configure-google-analytics.f5a42b1612bc3d95f2d0ebfcd96d3451d4c47cef0a852484054c20121e4d7be8.fdfbfafb.webp","alt":"The Configure Google Analytics form in Connector Settings, with no input fields at all — only Save and Cancel buttons below the heading","framed":false,"withLightbox":true,"width":"700px"},"children":[]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-connector-google-analytics-configured.47f2e47b49f159cbaec5b341ef9a45a27a7e5b542facd3b10ee8df8a4d178ca5.fdfbfafb.webp","alt":"The saved Google Analytics row in Connector Settings, showing its description, an expand chevron, an enable toggle, and a delete icon, with no network policy reminders","framed":false,"withLightbox":true,"width":"800px"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["That is the whole administrator setup. The saved row carries an enable toggle, and turning it off does more than stop new authorizations: it withdraws Google Analytics from the agent's permitted actions at once, in chats that are already running as well as new ones. A chat in flight is not interrupted, but the next operation the agent attempts is refused, so every existing connection stops working until you turn it back on. Members keep their connections while it is off."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Enabling the connector grants read access only"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every member who connects gives the agent the ability to read their GA4 reporting data for every property that member can reach. It grants nothing else. The agent cannot change a property's settings, create or archive custom dimensions and metrics, or change data retention, and it cannot read a property's configuration or administration either. Treasure AI requests only Google's read-only Analytics scope, so Google refuses a write regardless of what a member asks the agent to do, and the write operations are separately blocked by account policy. What the member's own Google account can read is the only thing to weigh before enabling it."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"No network policy change is needed"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Google Analytics connector lists ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["no egress domains"]},", and Connector Settings shows no \"allow this domain\" reminder for it. That is deliberate: the agent's sandbox never calls the Analytics APIs. The request is made by Treasure AI's connector service outside the sandbox, so your ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/security/network-policy"},"children":["network policy"]}," — which governs sandbox egress — does not apply to it and does not need a new rule."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2--authorize-your-connection-user","__idx":5},"children":["Step 2 — Authorize Your Connection (User)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each member who wants the agent to work with GA4 data authorizes their own connection. You can do this ahead of time from ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings"]},", or on demand from a chat."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings → Connections"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Under ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Available"]},", find ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Google Analytics"]}," and click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connect"]},"."]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-connections-google-available.961f60ca9f0438f15ef1d0a25d2b063119fcd44264cb7def42d2740de928964e.fdfbfafb.webp","alt":"The Connections page with Treasure AI Voice, Google Analytics, Google Calendar, Google Search Console, and Treasure Data all listed under Available, each with a Connect button","framed":false,"withLightbox":true,"width":"800px"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the Google popup, choose the Google account that holds your Analytics access. If you are signed in to more than one, pick deliberately — the connection carries whichever account you choose here."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Review the requested access and approve it. Google asks for a single permission — viewing your Analytics data — covering every property that account can reach."]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-connections-google-analytics-consent.7053c102eb7cc71bb7ca8756aba8b9a420b1f59be573e1eae71c1be7a798b02c.fdfbfafb.webp","alt":"The Google permission screen listing one item, 'See and download your Google Analytics data', with Cancel and Allow buttons","framed":false,"withLightbox":true,"width":"600px"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":5},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When the popup closes, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Google Analytics"]}," appears in your connected list with the date you connected it."]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-connections-google-analytics-connected.a3d5fd869be7416451610cb57b41b00b706746021cfd4ec9dfa44d121f32c4fb.fdfbfafb.webp","alt":"The Connections page with Google Analytics in the connected list, showing the date it was connected and a delete icon","framed":false,"withLightbox":true,"width":"800px"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A connection authorizes one Google account, and through it every GA4 property that account has access to. Studio holds one Google Analytics connection per member at a time, so to switch to a different Google account you delete the connection and authorize again."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To remove the connection later, click the delete (trash) icon next to it. The agent immediately loses access. Because the connection never writes, there is nothing in Analytics to undo. Google still lists Treasure AI Studio under your account's ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://myaccount.google.com/connections"},"children":["third-party access"]}," until you remove it there as well."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Connect from a chat instead"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You don't have to authorize in advance. If you ask the agent about your site traffic before you've connected, it shows a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connection Required"]}," card in the chat — click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connect"]}," there to run the same authorization without leaving the conversation. The card names the connector by its internal id, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics"]},". See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/connections#connect-from-a-chat"},"children":["Connect from a chat"]},"."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-3--use-google-analytics-in-a-chat","__idx":6},"children":["Step 3 — Use Google Analytics in a Chat"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once Google Analytics is connected, ask the agent in plain language — no commands and no configuration in the chat. For example:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["\"Which channels drove the most engaged sessions on our site last month, and how does that compare with the month before?\""]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["\"List my GA4 properties so I can tell you which one to use.\""]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["\"Show me the top 20 landing pages by users for the last 28 days, with engagement rate and average engagement time.\""]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["\"Which countries are growing fastest in key events this quarter?\""]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["\"How many people are on the site right now, and what are they looking at?\""]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["\"Break last week's conversions down by device and browser.\""]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["\"Cross-check the traffic sources for the campaign against the CDP segment that actually purchased.\""]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The agent chooses its own operations. It typically lists your properties first, then runs a report against the one you named. A GA4 property is identified by its numeric property ID, with or without the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["properties/"]}," prefix; if you do not know it, ask the agent to list your properties and pick from what it returns."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["GA4 reporting has real constraints that shape what the agent can answer, and they are Google's, not Treasure AI's. Not every dimension can be combined with every metric — the agent can check a combination before running it, and will tell you when one is not queryable. Reports are also subject to per-property API quotas, which a long series of large reports can exhaust; the agent can ask for the remaining quota to be returned alongside a report."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For anything that changes GA4 — editing a property, adding a custom dimension, changing data retention — the agent can tell you what it sees and what looks wrong, and you make the change in Google Analytics. The same goes for questions about how a property is set up: the agent works from reporting data, not from the property's configuration."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"what-the-agent-can-do","__idx":7},"children":["What the Agent Can Do"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These are the operations the agent can use. It picks them itself from what you ask for — there is no command syntax for running one directly, though naming an operation in your message does steer the agent toward it."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"18%","data-label":"Area"},"children":["Area "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"40%","data-label":"Operations"},"children":["Operations "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"42%","data-label":"What They Do"},"children":["What They Do "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Finding a property"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.list_properties"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List the GA4 properties the connected Google account can see, with their account context, so you can say which one to use. Up to 200 per page, paged."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prepared reports"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_pages_report"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_events_report"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_acquisition_report"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_key_events_report"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Four ready-made reports covering the questions asked most often: page views, users, sessions, and engagement per page; event volume, users, key events, and value; where sessions and users came from; and key-event volume with conversion rates."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom reports"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_report"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_pivot_report"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Build a report from whichever dimensions, metrics, date ranges, filters, ordering, cohorts, comparisons, and aggregations you need, as a flat table or a cross-tabbed pivot. Anything the prepared reports cover can also be expressed here."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Right now"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_realtime_report"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Read the realtime report — the users and events active on the site at this moment."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Before reporting"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.get_metadata"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.check_compatibility"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List the dimensions and metrics available on a property, including its custom ones, and check whether a chosen set can be queried together before spending a report on it."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"what-the-google-analytics-connector-does-not-expose","__idx":8},"children":["What the Google Analytics Connector Does Not Expose"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Nothing in Google Analytics changes through the agent, and the read surface stops at reporting. The cases worth knowing about:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No property changes."]}," The agent cannot edit a property's settings — its name, time zone, or currency. A time-zone change in particular shifts how every historical report is bucketed by day, which is why it stays a deliberate human action."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No custom dimension or metric changes."]}," The agent cannot create one, and cannot archive one. Archiving is irreversible in GA4 and the slots are capped, so a mistake there cannot be undone."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No data retention changes."]}," The agent cannot change a property's data retention setting. Shortening it deletes history permanently."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No configuration reads."]}," The agent cannot list a property's data streams, custom dimensions, or custom metrics as configuration, or read a property's setup summary. It sees custom dimensions and metrics only as reportable fields, through the metadata it reads before building a report."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No account or user administration."]}," The agent cannot create properties or accounts, or change who has access to them."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No Universal Analytics."]}," This connector reads GA4 properties through Google's GA4 APIs. Universal Analytics properties are out of scope."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No other Google products."]}," This connector reaches Google Analytics only. Google Search Console and Google Calendar are separate connectors, each with its own authorization."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"what-the-agent-can-see","__idx":9},"children":["What the Agent Can See"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Google Analytics connector carries your own Google authorization, so the connected Google account's Analytics access decides its reach:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Every GA4 property that account can open in Google Analytics"]},", and no others — there is no way to restrict a connection to one property."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The data each property's role allows."]}," Google assigns an account a role per property or account, and the agent inherits exactly that. A property you can only view in Analytics is a property the agent can only read."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Reporting data only."]}," Even within a property, the agent reads reports and the fields available to build them — not the property's configuration or its user list."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Nothing beyond reading."]}," The authorization carries no write capability at all, on any property, whatever the account's role is."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Google enforces this when the request arrives, not Treasure AI Studio, and no prompt can widen it. The agent can narrow the view — tell it to look at one property, or one date range — but never widen it."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"reference","__idx":10},"children":["Reference"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Item"},"children":["Item"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Connector"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Google Analytics"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Internal id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics"]}," — the id the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connection Required"]}," card shows in a chat"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authentication"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["OAuth 2.0 Authorization Code with PKCE (user-to-machine), platform-managed Google OAuth application"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Google scope requested"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["One: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://www.googleapis.com/auth/analytics.readonly"]},". The read-write ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["analytics.edit"]}," scope is deliberately not requested"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required configuration"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None. The administrator saves the connector with no fields to fill in"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Access"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Read-only, and narrowed to reporting — listing properties, four prepared reports, custom and pivot reports, the realtime report, and the metadata and compatibility checks needed to build a report. Nothing in Analytics can be changed through the agent, and its configuration cannot be read"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Google APIs used"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Analytics Data API v1beta (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://analyticsdata.googleapis.com/v1beta"]},"), its v1alpha endpoints for realtime and quota, and the Analytics Admin API v1beta (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://analyticsadmin.googleapis.com/v1beta"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Property support"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GA4 properties only. Universal Analytics is not supported"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Property identifier"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The numeric GA4 property ID, with or without the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["properties/"]}," prefix"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Properties per page"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200 maximum, paged with a token"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Dimension and metric compatibility"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not every combination is queryable. The agent can check a set before running it rather than discovering the failure in the report"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Quotas"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Google applies Data API quotas per property. A long series of large reports can exhaust them. The remaining quota can be returned alongside a report, but there is no way to read it without running one"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Agent identity"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reads as the authorizing Google account. Nothing is written, so nothing is recorded in Analytics as that account's action"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Where requests are made"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Treasure AI's connector service, outside the agent's sandbox"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Egress domains"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None — the sandbox never reaches the Analytics APIs, so no network policy rule is required"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Token lifetime"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Short-lived access tokens, refreshed automatically, so a connection keeps working across sessions without reconnecting"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Connections per member"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["One, covering one Google account and every GA4 property that account can access"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"troubleshooting","__idx":11},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Issue"},"children":["Issue"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Solution"},"children":["Solution"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Google Analytics isn't listed on the Connections tab"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An administrator must add the Google Analytics connector in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connector Settings"]}," and enable it."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The agent finds none of your properties"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Confirm you authorized the Google account that actually holds the Analytics access — the popup's account picker is easy to click through. Delete the connection and reconnect with the right account. Universal Analytics properties do not appear at all; only GA4 properties do."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The agent reports a property as not found"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use the numeric GA4 property ID. Ask the agent to list your properties and use the identifier it returns, rather than the property's display name."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A report fails saying the dimensions and metrics are incompatible"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GA4 does not allow every combination. Ask the agent to check compatibility first and to propose a set that works, or to split the request into two reports."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Numbers don't match the GA4 interface"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Check that the date range, property, and any filters match. GA4 also applies data thresholding and sampling of its own, so a report broken down finely can legitimately total less than the same report at a higher level."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reports start failing after several large ones"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The property's Data API quota is exhausted. Ask the agent to return the remaining quota with its next report, then to run fewer or smaller reports, or retry later."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["You asked the agent to change a property setting and it refused"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Expected. The connection is read-only: editing a property, creating or archiving custom dimensions and metrics, and changing data retention are all blocked, and the read-only scope would refuse them anyway. Make the change in Google Analytics."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["You asked which data streams a property has and the agent couldn't say"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Expected. Configuration reads are outside this connector's surface. Check the property's data streams in Google Analytics. If the question is really \"what do these numbers cover\", ask the agent to break a report down by stream instead."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The agent says the connection needs to be reconnected"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The authorization expired or was revoked on the Google side — including by removing Treasure AI Studio from your Google account's third-party access. Reconnect from ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings → Connections"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The connector disappeared from the Connections tab"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An administrator may have disabled it. Your connection is kept, but the agent cannot use Google Analytics until the connector is enabled again."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":12},"children":["Next Steps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/connections"},"children":["Connections"]}," — The general connection model and administrator controls"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/connections/google-search-console"},"children":["Connect Google Search Console"]}," — Let the agent read your Google Search performance data"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/connections/google-calendar"},"children":["Connect Google Calendar"]}," — Let the agent read your calendars and create or update events"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/skills/skills"},"children":["Skills & Marketplace"]}," — How skills give the agent domain expertise"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/security"},"children":["Security Overview"]}," — How access control works in Studio"]}]}]},"headings":[{"value":"Connect Google Analytics","id":"connect-google-analytics","depth":1},{"value":"Objective","id":"objective","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Who Does What","id":"who-does-what","depth":2},{"value":"Step 1 — Enable the Google Analytics Connector (Administrator)","id":"step-1--enable-the-google-analytics-connector-administrator","depth":2},{"value":"Step 2 — Authorize Your Connection (User)","id":"step-2--authorize-your-connection-user","depth":2},{"value":"Step 3 — Use Google Analytics in a Chat","id":"step-3--use-google-analytics-in-a-chat","depth":2},{"value":"What the Agent Can Do","id":"what-the-agent-can-do","depth":2},{"value":"What the Google Analytics Connector Does Not Expose","id":"what-the-google-analytics-connector-does-not-expose","depth":3},{"value":"What the Agent Can See","id":"what-the-agent-can-see","depth":2},{"value":"Reference","id":"reference","depth":2},{"value":"Troubleshooting","id":"troubleshooting","depth":2},{"value":"Next Steps","id":"next-steps","depth":2}],"frontmatter":{"seo":{"title":"Treasure AI Studio - Connect Google Analytics","description":"Connect Google Analytics to Treasure AI Studio so agents can read your GA4 reports and answer questions about traffic, pages, events, and conversions."},"platforms":["Web","Desktop"]},"lastModified":"2026-09-30T13:35:41.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/ai-studio/connections/google-analytics","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}