> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openlens.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search & Traffic

> Google Search Console and GA4 data next to your AI visibility. In the dashboard, in the agent, over MCP.

Your dashboard shows how AI platforms talk about a brand. Search & Traffic adds the two Google datasets you already live in: Search Console for what classic search does with the brand, GA4 for what AI platforms actually send you in sessions and conversions. Connect once and the same data is available in three places. The Search & Traffic page, the in-app agent, and the [MCP server](/mcp/tools). Every plan, and reads cost nothing against your credit pool.

## Connect Google

Settings, Google Integrations card. Search Console and GA4 are separate connections. Connect either or both, with the same Google account or different ones, and disconnect them independently.

* Organization owners and admins make the connection. One connection covers every project in the organization.
* The Google account needs Owner or Full access on the Search Console property, and read access on the GA4 property.
* The scopes are read-only. OpenLens never changes anything in your Google account.

<Note>
  On the GA4 consent screen, Google currently shows an unverified-app warning. Click **Advanced**, then continue. Verification is in progress with Google, and the warning has no effect on the data.
</Note>

## Point each project at its properties

The connection belongs to the organization. The properties belong to the project. In each project's Settings, pick that project's Search Console property and GA4 property from the dropdowns. Domain properties (`sc-domain:`) cover every subdomain and protocol, so use the domain property when you have one. Property selection is admins only. Viewing the data is open to anyone with access to the project, including users with the client role.

## The Search & Traffic page

Every configured project gets a Search & Traffic page in the sidebar, with 7, 28, and 90 day windows.

**Google Search.** Clicks, impressions, CTR, average position, the trend, and top pages and top queries. Two things to know when the numbers look off. Search Console data runs 2 to 3 days behind, and that lag is on Google's side. And the headline totals match the GSC UI, while the tables count per page, so table columns can sum higher than the headline. Both are correct.

**AI Referral Traffic.** Sessions and key events from AI referrers, split by platform (ChatGPT, Perplexity, Gemini, Claude, Copilot, Grok, DeepSeek), next to your site totals. Referrer attribution undercounts. Visits from native apps and pasted links carry no referrer at all. Treat the number as a floor.

## Ask the agent

The agent has both datasets as tools, and this is where the integration earns its keep. It can join Google data with visibility data and turn the answer into a deliverable. Asks that work today:

* "Which pages get Google clicks but never show up as AI citations?"
* "Did the pages we rewrote in June move on impressions?"
* "Build a client-ready deck comparing our AI referral traffic to organic search over the last 90 days."

The agent respects the same setup chain. If the connection or a property is missing, it tells you exactly what to fix instead of guessing.

## Over MCP

The same two tools, `get_gsc_search_analytics` and `get_ga4_ai_traffic`, are exposed by the OpenLens MCP server. Claude Desktop, Cursor, anything that speaks MCP. See the [MCP tools reference](/mcp/tools#google-integrations).

## What we store

* OAuth tokens, encrypted. That is the whole footprint.
* Search Console and GA4 data is fetched from Google on demand and cached for about an hour. We never warehouse it.
* Disconnecting deletes the tokens and revokes OpenLens's access at Google.

## When it doesn't work

| You see                       | Why                                                              | Fix                                                         |
| ----------------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------- |
| "Not set up for this project" | Connected, but no property assigned to this project              | Pick the property in the project's Settings                 |
| "Not connected"               | The organization has no GSC or GA4 connection                    | An owner or admin connects in Settings                      |
| "Reconnect required"          | Google revoked or expired the grant, or property access was lost | Reconnect, or re-pick the property                          |
| Empty data                    | Property is new to GSC, or no AI-referred sessions in the window | Wait out the 2 to 3 day lag, or widen the window to 90 days |
