set up treg — https://treg.to/llms.txt
Using treg, show me sessions and key events by default channel group for the last 28 days ending 3 days ago, next to the 28 days before, and flag any channel that is down by more than a fifth.
One consent screen for the Google account that can see the property. No Cloud project, no service account.
A Google account often sees several GA4 properties. The agent can list them and ask.
GA4 keeps processing recent days. A window that ends on yesterday is still settling.
Your own account, so the call is never metered.
treg.to holds the provider keys. Neither you nor the agent sees them.
The provider's own rate, $0.000 markup, from a prepaid balance.
Charged per call. $1.00 free per new team, no card to start.
Already pay Hunter? Register it and those calls are never metered.
Another provider is a different word in the prompt, not a new integration.
No SDK, no OAuth dance per vendor, no seats.
Google Analytics answers this job. You connect it once, treg.to keeps the token server side, and the call is never metered.
treg call google-analytics.report --data '{"dateRanges":[{"startDate":"28daysAgo","endDate":"yesterday"}],"dimensions":[{"name":"sessionDefaultChannelGroup"}],"metrics":[{"name":"sessions"}],"limit":3}'Every endpoint on this connection is listed on the Google Analytics (GA4) shelf.
Around 34 of the ~75 relevant posts in August 2026 were launches of one more GA4 MCP or dashboard, several posted word for word across five subreddits. These four are people asking for the thing rather than selling it.
“What AI agent tools can I use to connect to the Google Analytics API and retrieve data through a chat-based conversational interface” r/GoogleAnalytics, 17 points
What this page can do about it: Any of them, once the agent can reach a connected property. That is what the setup line on this page does: the agent gets the report call and the token stays with treg.to.
“I asked 6 LLMs for code samples and I got 6 different answers that all failed to do the API call.” r/dataengineering
What this page can do about it: The request body is the hard part and here nobody writes it. The agent builds it from the question, runs it, and shows it back, so a wrong dimension name is a visible mistake rather than a silent one.
“according to the interface I'm getting 2.2M event counts, whereas the API says 495k event counts for the same page.” r/GoogleAnalytics
What this page can do about it: No relay can settle this, and this page will not claim to. Both numbers can be correct for two differently scoped requests. What the agent adds is the request itself, in the open, so you can see which shape produced which number.
“I feel like I'm missing something obvious in GA4 about how to get at that data since I can SEE it right there” r/GoogleAnalytics
What this page can do about it: Daily views for one page is a two-line report on the API: a date dimension, a page filter, a views metric. Ask for it in those words and the agent returns the table, no export ritual.
Here the app is treg.to's, the consent is one screen, and read access on the property is enough, which is what makes it usable by a consultant who does not own the account.
A metric scoped by session counts differently once you break it down by an event-scoped dimension, and the API returns exactly what the UI would for the same request. When the number disagrees with the report you remember, ask the agent to run both shapes and show the request, rather than assuming one is wrong.
GA4 keeps event-level data for two months by default, so a year-on-year or cohort question beyond that window comes back empty from the API exactly as it does from Explore. The Data API also enforces per property token quotas per hour and per day, so a wide report with many dimension combinations is dearer in quota than a narrow one, and the agent should ask before running a loop over every page.
The Google Analytics Data API is the programmatic side of GA4: you send a property id, a date range, dimensions, metrics and optional filters, and it returns the rows the UI's Reports and Explore views are built from. It is the same data with none of the Explore date-range or sampling-pool caps, and the reason to read it through an agent is that the request body, with its dimension and metric names, is fiddly to write and easy to get subtly wrong by hand.
No. Google Analytics runs on your own Google account, so treg.to relays the call and meters nothing. Only calls on treg.to's own provider keys are billed.
No. treg.to holds the Google app; you consent once with the account that can see the property, and treg.to keeps the token server side. Your agent never sees it.
Anything runReport accepts: any combination of dimensions and metrics, date ranges, filters, ordering and paging. Realtime visitors are a separate call, on the neighbouring row of the menu.
No. If the tagging or consent setup is feeding GA4 the wrong events, the API returns the same wrong numbers. The agent can show you the request it made, which is the first step in finding out why.