Fix the busiest pages first
Which five pages get the most views? Check each for obvious performance problems.
Puts effort where visitors are.
Codex can change any file in your repo, but it cannot tell which pages people actually use or where they give up. Connect GA4 to LopeBase, run one command, and Codex can read your traffic and conversions before it decides what to change.
One command sets it up. Your sign in stays in your user folder, not the repo.
One question, one tool call, and an answer built on your own GA4 numbers.
Our pages are slow. Which ones matter most by traffic? Start there.
read_sourcega4-acmetop_paths
| url | views | visitors |
|---|---|---|
| / | 14,220 | 9,870 |
| /docs/quickstart | 6,310 | 3,940 |
| /pricing | 4,880 | 3,610 |
| /blog/net-30 | 2,140 | 1,980 |
The quickstart is your second busiest page. It loads a 900 KB code highlighter on every visit; I made it load only where code blocks appear. Home and pricing are next.
Codex starts with the pages people visit most, not the ones it happens to open first.
npx lopebase keeps the sign in in your user folder and starts LopeBase for Codex through it.
Ask again next week and Codex can check whether the page's bounce or conversion moved.
Three steps. The first is the same for every app; the rest is specific to Codex.
Connect GA4 to LopeBase. Start free, add your site, press Connect with Google, and pick the GA4 property. You need no Google Cloud project and no API key. Google is only asked for read access.
Run npx lopebase in your project folder. It signs this computer in, then registers LopeBase with Codex as npx lopebase mcp, which forwards to the hosted server with your saved sign in. No token ends up in the repo.
Start Codex and ask. Codex now lists the LopeBase tools. Ask in plain words; it picks the dataset and reads the rows.
$ npx lopebase
Works on macOS, Linux, and Windows with Node 18 or later. If the saved sign in expires, Codex says so; run npx lopebase login and carry on.
Codex works through a whole task. Give it the goal and let it use the data.
Which five pages get the most views? Check each for obvious performance problems.
Puts effort where visitors are.
Mobile converts worse than desktop. Find and fix the cause in the signup flow.
Device numbers point Codex at the right screen.
Which routes in this repo got no visits in the last 7 days?
Compares your routes with real traffic.
Write a five line traffic summary for the changelog draft.
Headline numbers plus the reason behind them.
Seven datasets per GA4 property. Breakdowns cover the last 28 days and the trend up to 90. Pass any event as a goal to count conversions.
More on each dataset: Google Analytics MCP. Connecting in the console: the GA4 connector.
LopeBase is not the only route. Here is how it compares with the usual one.
| Topic | Google's Analytics MCP server | LopeBase |
|---|---|---|
| Setup | Python and pipx, a Google Cloud project, two APIs, local credentials, and a config entry. | npx lopebase and Connect with Google. |
| Credentials | Application default credentials on your computer. | Kept by LopeBase, encrypted. Codex never sees them. |
| Flexibility | Any GA4 report Codex can describe. | Seven shaped datasets with goal counts. |
| Other data | GA4 only. | Search Console, Bing, PostHog, Stripe, and uptime too. |
| Best when | You need custom GA4 reports. | You want Codex using traffic data in minutes. |
Google's server is described from its own README, checked October 2026. It is labeled experimental there.
Something else? Contact us.
It signs this computer in and registers LopeBase with Codex as npx lopebase mcp. That command forwards to LopeBase with your saved sign in.
No. Codex gets counts and rates per page, channel, and device. Never a visitor, an IP address, or a user ID.
Read live from the GA4 Data API each time Codex asks. GA4 itself can take a few hours to process recent events.
No. LopeBase only has read access to GA4.
Your saved sign in expired or was revoked. Run npx lopebase login and ask again.
Free for one product. No card. Agent access is on every plan.