Codex Wiring Up Google Analytics: What the APIs Actually Let a Coding Agent Do
Watch on TikTok
A coding agent can install Google Analytics tracking and verify a site in Search Console through documented APIs, but Google publishes no API for creating a saved report or exploration inside the GA4 interface. This 42-second clip, posted 2026-08-25, describes Jenna Gardner handing marketing analytics setup to OpenAI Codex after rebuilding her website and cohort page. She lists three jobs: the Google Analytics tracking install, reports "within Google Analytics," and Google Search Console setup. Two of those three map cleanly onto published Google APIs. The middle one does not, and the gap is worth naming because it decides whether you can automate the task or still have to click through it yourself.
What the video shows and what it only asserts
All 21 sampled frames are a handheld selfie shot in a kitchen or living room. A black caption bar reading "Codex sets up analytics tracking and reporting" sits at the top of every frame. Auto-generated subtitles run along the bottom, matching the spoken audio line for line ("I LOVE IT. I MIGHT EVEN LOVE", "HOST IT ON NETLIFY. WE KNOW HOW TO", "BUT IT INPUTTED ALL OF MY GOOGLE AN...", "AND THEN IT MADE REPORTS", "MY GOOGLE SEARCH", "SET UP ALL THE STUFF THAT YOU NEED FOR MARKETING ANALYTICS").
No frame contains a terminal, an IDE, a GA4 property, a Search Console property, a chart, or a line of code. There is no screen recording at any point. The attribution to Codex rests entirely on her spoken claim and the caption bar. Treat the specific outcomes as a first-hand report rather than a demonstration.
One correction to the automatic transcript: it renders the host as "NetFly." The video's own on-screen caption reads "HOST IT ON NETLIFY," so the host is Netlify.
Which Codex this is
The hashtags name both #codex and #claude, and the post tags @OpenAI. The product described is OpenAI's Codex coding agent, which OpenAI released as an open-source terminal CLI in April 2025 and then as a cloud agent in research preview in May 2025, later extending it to IDE extensions and a desktop app that merged into the ChatGPT desktop application in July 2026 (openai/codex, timeline).
That product shares a name with an earlier one. The 2021 Codex model family, served through the API as code-davinci-002, code-davinci-001, code-cushman-002, and code-cushman-001, was announced as deprecated on 2023-03-20 and shut down on 2023-03-23, per OpenAI's deprecations page. Anyone reading "Codex" in a 2026 post is reading about the agent, not that model.
The Google Analytics claim, checked against Google's own APIs
Her first claim is the tracking install, described as "it inputted all of my Google Analytics tracking." That is a file edit. Installing GA4 on a site means placing the gtag.js snippet with a measurement ID into the page templates, which is ordinary work for any agent with write access to the repo (GA4 collection docs). Nothing about that claim conflicts with the documentation.
Her second claim, "it made reports within Google Analytics for me," is the one that needs care. Google splits GA4 automation across two APIs with a hard line between them:
- The Admin API manages configuration. It covers accounts and properties, web and app data streams, custom dimensions and custom metrics, key events, event create and edit rules, audiences, data retention, and integrations with BigQuery and Google Ads. Google's documentation states it does not handle report creation or custom report definitions.
- The Data API v1 runs report queries. Methods including
runReport,batchRunReports, andrunPivotReportreturn report data so you can build dashboards elsewhere. It returns results to the caller rather than saving a persistent report inside the GA4 platform.
Google's own Analytics MCP server, the most direct way to point an agent at GA4, is explicit on the same point: "The MCP server is available for read requests only. It can't edit your Google Analytics configuration or settings" (source repo).
So there are two readings of "made reports." If Codex wrote a script that pulled GA4 data and produced a report artifact, that is squarely supported. If Codex created a saved custom report or an exploration inside the GA4 report library, Google publishes no API for that, and the clip offers no evidence of how it would have happened. Which one she means is unverified from the video.
Search Console setup is the part the APIs do support
Her third claim holds up well against the documentation. Google publishes two separate APIs that together cover a Search Console onboarding:
- The Site Verification API issues a verification token through
getTokenin one of four formats (HTML file, HTML meta tag, DNS TXT record, DNS CNAME record), then confirms ownership throughinsertonce the token is in place. - The Search Console API adds the property itself through
sites.add, aPUTagainsthttps://www.googleapis.com/webmasters/v3/sites/siteUrlwith thewebmastersscope, accepting either a URL-prefix property or ansc-domain:domain property.
An agent that can edit the site, write DNS records, and hold an OAuth credential has a documented path through all of it. This is the claim in the video with the cleanest supporting evidence.
The Claude comparison describes a prompt, not a capability gap
She opens by saying she might love Codex more than Claude right now and that the two "go back and forth" for her, then adds that Claude could have rebuilt the site and deployed it easily. The implied differentiator is that Codex did the analytics plumbing.
On timing, Anthropic announced Claude Code on 2025-02-24 alongside Claude 3.7 Sonnet as a research preview with file editing, bash execution, and git workflows (announcement), and moved it out of research preview on 2025-05-22 with Claude 4 and native VS Code and JetBrains integrations (announcement). OpenAI's Codex CLI followed Claude Code's preview by about seven weeks. The terminal coding agent shipped on Anthropic's side first.
On capability, both products are general coding agents that read and write files, run shell commands, and connect to MCP servers. Neither vendor documents GA4 or Search Console wiring as a product feature exclusive to its agent. The documented path for both runs through the same Google APIs described above. What the clip records is the result of asking one agent to do a job she had not asked the other to do.
Key Takeaways
- Installing the GA4 gtag.js snippet is a file edit, and any coding agent with repo write access can do it.
- Google's Admin API manages GA4 configuration and explicitly excludes report creation. The Data API runs report queries and returns data to the caller. Neither saves a custom report or exploration into the GA4 interface.
- Google's official Analytics MCP server is read-only by design and cannot change GA4 settings, which limits how far an MCP-connected agent can go.
- Search Console onboarding is genuinely automatable through the Site Verification API (
getToken, theninsert) and the Search Console API (sites.add). - "Codex" in 2026 means OpenAI's coding agent, released in 2025. The 2021 Codex model family was shut down on 2023-03-23.
- Claude Code's research preview predates the Codex CLI by roughly seven weeks, and both are general-purpose coding agents. The video's preference is a workflow report rather than a documented feature difference.
- The clip contains no screen recording, so every specific outcome in it is a first-hand claim without on-screen evidence.
Resources
- Source video on TikTok
- OpenAI Codex CLI repository
- ChatGPT and Codex changelog
- OpenAI model deprecations, including the 2023 Codex model shutdown
- Anthropic: Claude 3.7 Sonnet and Claude Code
- Anthropic: Claude 4 and Claude Code general availability
- Google Analytics 4 collection setup
- Google Analytics Admin API v1
- Google Analytics Data API v1
- Google Analytics MCP server documentation
- googleanalytics/google-analytics-mcp on GitHub
- Google Site Verification API: getting started
- Search Console API: sites.add
- Netlify documentation
Published August 25, 2026. Writeup generated from a favorited TikTok.