# Google Analytics 4 (GA4) (/docs/ga4-integration)

While AI tracking shows you where you *appear*, Google Analytics 4 (GA4) shows you what users *do* when they actually click through to your site. Connecting GA4 to RankZero closes the loop between AI Search visibility and actual site traffic.

Inside the **RankZero App**, integrating GA4 unlocks powerful native features:

* **Traffic Page:** Access a dedicated Traffic dashboard that breaks down your actual active sessions and engagements.
* **Model Performance:** See which specific AI models (like ChatGPT vs. Claude) are driving the most high-value sessions to your domain.
* **AI Traffic Attribution:** Precisely isolate "AI-referred" traffic vs standard organic to demonstrate real ROI.
* **Revenue Attribution:** Map your AI visibility directly to e-commerce conversions and revenue captured in GA4.

## 🔗 Connecting Your Account

1. Navigate to the **Integrations** page via the left-hand sidebar menu in RankZero.
2. Under the Google Integration card, click **Connect**.
3. You will be redirected to Google's secure OAuth flow.
4. Log in using the Google Account that has `Viewer` (or higher) permissions for your brand's GA4 Property.
5. **Crucial:** Ensure that the checkbox for *Google Analytics* is checked when asked for permissions.
6. Upon successful authorization, you will be redirected back to RankZero.

## ⚙️ Selecting the Right Property

1. Once connected, your Google account will show as **Connected**.
2. Click on the dropdown menu next to **Google Analytics 4**.
3. Select the exact Analytics Property (often named after your website) that corresponds to your brand.
   *If your dropdown is empty, double-check that your Google Account has been granted access to the specific GA4 property in the Google Analytics admin panel.*
4. Click **Save Settings**.

***

## 🚀 Use Cases with RankZero MCP

Connecting GA4 empowers the [RankZero Claude MCP](/docs/mcp-guide) with the `get_ga4_report` tool, allowing Claude to instantly fetch customized cuts of your traffic data.

### 1. Correlating AI Visibility with Traffic

You can ask Claude to fetch both datasets and compare them instantly:

> *"I noticed my AI Overview visibility spiked on Tuesday. Did my GA4 organic traffic also spike on that day?"*

### 2. Instant Reporting

Skip building complex Looker Studio dashboards.

> *"What were my top 5 most visited pages over the last 7 days according to GA4?"*

### 3. Channel Diagnosics

> *"Get my GA4 session data for the last 30 days broken down by `sessionDefaultChannelGroup`. Which channel is growing the fastest?"*

***

## 🔒 Privacy & Permissions

RankZero requests strictly **ReadOnly** scopes from Google Analytics. We **cannot** edit or delete your GA4 properties, data streams, or events. Your OAuth tokens are encrypted at rest, and you can revoke RankZero's access at any time via your Google Account settings.
