# Read Search Console and Analytics with Codex

> Read Search Console and GA4 reports from Codex. It calls StoreSEO for queries, pages and traffic sources, and you set the tool timeout and approval mode.

Reading Google reports with Codex means asking OpenAI's coding agent, in the terminal or the IDE extension, for Search Console and GA4 numbers through StoreSEO and getting a comparison with the previous period back in the session.

## How do you set up Codex for this?

### 1. Add StoreSEO to Codex

Run this in any terminal. It writes a [mcp_servers.storeseo] table to ~/.codex/config.toml, which the Codex CLI, the IDE extension and the ChatGPT desktop app all read.

```bash
codex mcp add storeseo --url https://mcp.storeseo.com/mcp
```

### 2. Sign in to your store

Run the login command. Your browser opens: pick your Shopify store and approve access. Then run codex mcp list, or type /mcp inside Codex, to confirm storeseo is there.

```bash
codex mcp login storeseo
codex mcp list
```

### 3. Or write it in config.toml (optional)

If you would rather edit the file, add this table to ~/.codex/config.toml, or to .codex/config.toml in a trusted project. In the desktop app or the IDE extension you can add the same URL under MCP servers, Add server, Streamable HTTP.

```toml
[mcp_servers.storeseo]
url = "https://mcp.storeseo.com/mcp"
```

### 4. Or connect with an access token (optional)

Generate a token in StoreSEO under Settings, AI Toolkit, export it as STORESEO_TOKEN in your shell, and point config.toml at that variable. Codex sends it as an Authorization Bearer header, so the token never sits in the file.

```toml
[mcp_servers.storeseo]
url = "https://mcp.storeseo.com/mcp"
bearer_token_env_var = "STORESEO_TOKEN"
```

Then ask: "Use StoreSEO to get Search Console clicks by country and by device for the last 28 days and compare with the previous period."

## How does this work in Codex?

You start Codex in a theme repository, with StoreSEO already added to config.toml and signed in with codex mcp login, and ask for a report such as which countries and devices send the most clicks. Codex calls storeseo_start to open the session, then storeseo_get_search_console_insights once for the country dimension and again for device, and you see each call in the transcript. Each response has range totals, the top rows by clicks and the per-metric change against the previous equal-length period.

For visitor data Codex calls storeseo_get_analytics_report, choosing demographics for country, traffic_source for channels or key_events for conversions. Because Codex works in your repository, it can write the results to a file, diff them against an earlier pull, or tie a page from the report to the template in the repo that produces it. The same config.toml is shared by the CLI, the IDE extension and the desktop app, so a report started in one place uses the same server settings as another.

The approval mode on the storeseo server decides what you see while this runs. The Google tools are read-only, so with the writes mode Codex should run them without a prompt and still stop for anything that is not marked read-only, which is the setting to keep for the jobs that follow a report, such as applying new meta, where you want the prompt. If a pull is large, ask Codex to split it by dimension and keep the result in a file.

### Example session (illustrative)

**You:** Which countries and devices bring the most Google clicks? Compare with last period.
→ `storeseo_start` (read-only)
→ `storeseo_get_search_console_insights` (read-only)
→ `storeseo_get_search_console_insights` (read-only)
**Agent:** Illustrative result: most clicks come from one country, and mobile is the larger device share. Clicks rose against the previous 28 days on both. Want the GA4 key events by traffic source too?
**You:** Yes.
→ `storeseo_get_analytics_report` (read-only)

## What StoreSEO does: search console and analytics reports

StoreSEO connects to your Google Search Console and Google Analytics 4 property. The agent reads Search Console performance by date, query, page, country, device or search appearance, and curated GA4 reports, each compared with the previous period by default.

Tools: `storeseo_get_search_console_insights`, `storeseo_get_analytics_report`

Requires: A paid StoreSEO plan with Google connected in the app, and a GA4 property selected for Analytics reports.

1. **Pick the question.** Search Console answers how you appear in Google: clicks, impressions, CTR and average position. GA4 answers what visitors do: users, engagement, pages, sources and key events.
2. **Read the report.** The agent reads the last 28 days by default, or the range you name, broken down by the dimension that fits the question.
3. **Compare periods.** Both reports include the previous period of the same length and the change per metric unless you ask otherwise.
4. **Turn it into actions.** The agent can link what it finds to the other jobs, for example pages with impressions but a low CTR are candidates for new meta.

## Search Console and Analytics reports reference

| Setting or limit | What applies |
|---|---|
| Search Console metrics | Clicks, impressions, CTR, average position |
| Search Console dimensions | Date, query, page, country, device, search appearance |
| GA4 reports | Search traffic, user activity, demographics, page performance, traffic source, key events |
| Default range | Last 28 days |
| Comparison | Previous equal-length period with per-metric change, on by default |
| What it writes | Nothing. Both tools are read-only and never connect or configure Google |
| Plan | Paid plan with Google connected; GA4 property selected for Analytics |

## Rules Codex follows

- Both tools are reads and run straight away.
- Connecting Google or choosing the GA4 property is done in the StoreSEO app; the agent hands you the link when it is missing.
- Numbers are reported as Google returns them; the agent does not project outcomes from them.

**In Codex:** Codex waits 60 seconds for a tool call by default, and a Search Console pull with a wide date range and a large top_n on a busy store can run long. If a report times out, raise tool_timeout_sec for the storeseo server in config.toml or ask for a narrower range or one dimension at a time. Keep the server's default_tools_approval_mode on writes or prompt, not approve, so the read tools run and the tools that change your store still stop for a decision.

## What can you ask Codex to do?

- Use StoreSEO to get Search Console clicks by country and by device for the last 28 days and compare with the previous period.
- Pull my top 25 queries from Search Console and write them with position changes to reports/queries.csv.
- Get the GA4 search_traffic report for the last three months and tell me which month was strongest.
- Which queries brought the most clicks from Google in the last 28 days, and how does that compare with the month before?
- Which product pages have high impressions but a CTR under two percent?
- Show organic search traffic from GA4 for the last three months.
- Which countries send the most visitors, and on which devices?
- Which traffic sources led to purchases last month?

## Frequently asked questions

### Why does a Codex Search Console report time out?

Codex waits 60 seconds for a tool to finish by default. A large pull can take longer, so raise tool_timeout_sec for the storeseo server in config.toml, or ask for a smaller top_n, a shorter range or a single dimension.

### Does the Codex CLI use the same StoreSEO setup as the IDE extension?

Yes. The CLI, the IDE extension and the desktop app share config.toml, so the storeseo server entry and its approval settings apply in all of them. A project-level file only loads in trusted projects, so the user file is simpler.

### Can the agent connect my Google account?

No. Connecting Search Console and Google Analytics, and choosing the GA4 property, is done in the StoreSEO app. If Google is not connected, the tool returns a link telling you what to set up.

### Can these reports change anything?

No. Both Google tools are read-only. They never connect, configure or write anything in Google or in your store.

### Which plan includes Google reports over MCP?

A paid StoreSEO plan with Google connected. Analytics reports also need a GA4 property selected in the app.

### How far back can the agent look?

You can name any date range the report supports. When you do not, both tools default to the last 28 days and compare it with the 28 days before.

## Search Console and Analytics reports with other agents

- [Read Search Console and Analytics with Claude](https://storeseo.com/agent/claude/google-reports)
- [Read Search Console and Analytics with ChatGPT](https://storeseo.com/agent/chatgpt/google-reports)
- [Read Search Console and Analytics with Claude Code](https://storeseo.com/agent/claude-code/google-reports)
- [Read Search Console and Analytics with Claude Cowork](https://storeseo.com/agent/claude-cowork/google-reports)
- [Read Search Console and Analytics with Cursor](https://storeseo.com/agent/cursor/google-reports)
- [Read Search Console and Analytics with Gemini CLI](https://storeseo.com/agent/gemini-cli/google-reports)
- [Read Search Console and Analytics with GitHub Copilot](https://storeseo.com/agent/github-copilot/google-reports)
- [Read Search Console and Analytics with Windsurf](https://storeseo.com/agent/windsurf/google-reports)
- [Read Search Console and Analytics with Grok](https://storeseo.com/agent/grok/google-reports)
- [Read Search Console and Analytics with ChatGPT dots](https://storeseo.com/agent/chatgpt-dots/google-reports)
- [Read Search Console and Analytics with Grok Bot](https://storeseo.com/agent/grok-bot/google-reports)
- [Read Search Console and Analytics with Muse](https://storeseo.com/agent/muse/google-reports)
- [Read Search Console and Analytics with Manus](https://storeseo.com/agent/manus/google-reports)
- [Read Search Console and Analytics with OpenClaw](https://storeseo.com/agent/openclaw/google-reports)
- [Read Search Console and Analytics with Hermes Agent](https://storeseo.com/agent/hermes-agent/google-reports)
- [Read Search Console and Analytics with Paperclip](https://storeseo.com/agent/paperclip/google-reports)
- [Read Search Console and Analytics with NanoClaw](https://storeseo.com/agent/nanoclaw/google-reports)
- [Read Search Console and Analytics with OpenCode](https://storeseo.com/agent/opencode/google-reports)
- [Read Search Console and Analytics with Zed](https://storeseo.com/agent/zed/google-reports)
- [Read Search Console and Analytics with Kiro](https://storeseo.com/agent/kiro/google-reports)
- [Read Search Console and Analytics with Antigravity](https://storeseo.com/agent/antigravity/google-reports)
- [Read Search Console and Analytics with Kimi Code](https://storeseo.com/agent/kimi/google-reports)

## More Codex guides

- [Codex and StoreSEO overview](https://storeseo.com/agent/codex)
- [Audit your store's SEO with Codex](https://storeseo.com/agent/codex/seo-audit)
- [Optimize meta tags and content with Codex](https://storeseo.com/agent/codex/optimize-meta)
- [Optimize images and alt text with Codex](https://storeseo.com/agent/codex/image-seo)
- [Get products ready for AI search with Codex](https://storeseo.com/agent/codex/ai-search-readiness)
- [Publish llms.txt and agents.md with Codex](https://storeseo.com/agent/codex/llms-txt-agents-md)
- [Set up structured data with Codex](https://storeseo.com/agent/codex/structured-data)
- [Manage sitemaps and indexing with Codex](https://storeseo.com/agent/codex/sitemaps)
- [Track keyword rankings with Codex](https://storeseo.com/agent/codex/keyword-tracking)
- [Write SEO blog post drafts with Codex](https://storeseo.com/agent/codex/blog-posts)

## Related documentation

- [StoreSEO with Google Search Console](https://storeseo.com/docs/storeseo-with-google-search-console)
- [How to use Search Console insights](https://storeseo.com/docs/how-to-use-google-search-console-insights)
- [Connect StoreSEO with Google Analytics](https://storeseo.com/docs/how-to-connect-storeseo-with-google-analytics)

---

Canonical: https://storeseo.com/agent/codex/google-reports
Last updated: October 2026.

Approval: Reads run straight away; StoreSEO tells the agent to preview and wait for your yes before it writes, spends credit or publishes, and your client's tool-approval setting is the hard stop.

Every agent guide: https://storeseo.com/agent · Connect the MCP server: https://storeseo.com/docs/connect-storeseo-mcp-to-your-ai-assistant · Pricing: https://storeseo.com/pricing · Install StoreSEO: https://apps.shopify.com/storeseo
