# Google Analytics 4 (/integrations/analytics/google-analytics)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 444 · updated: 2026-07-30 -->
Related: [Analytics integrations](/integrations/analytics/overview.md), [Adobe Analytics](/integrations/analytics/adobe.md), [Amplitude](/integrations/analytics/amplitude.md), [Clarity](/integrations/analytics/clarity.md), [Clearbit](/integrations/analytics/clearbit.md), [Fathom](/integrations/analytics/fathom.md)

You need to generate a new <Tooltip tip="Google Analytics 4">GA4</Tooltip> property to use with Mintlify. The data collected goes into the same project as your other Google Analytics data.

If you are using the old version of Google Analytics, Universal Analytics, you can still generate a <Tooltip tip="Google Analytics 4">GA4</Tooltip> property. <Tooltip tip="Google Analytics 4">GA4</Tooltip> data is slightly different from UA data but still gets collected in the same project.

## Connect GA4 to Mintlify [#connect-ga4-to-mintlify]

### Create a web stream [#create-a-web-stream]

You need to create a web stream to get the Measurement ID to put into Mintlify.

Click the cog at the bottom left of the Google Analytics screen. Then click Data Streams.

<Frame>
  ![Screenshot of the Data Streams page in the Google Analytics dashboard.](/_assets/e3d65da1bb0cf828c4d15966620065495152a1e50adf88b9679acfbac0365ad2)
</Frame>

Create a Web Stream and put the URL of your Mintlify docs site as the stream URL.

Your Measurement ID looks like `G-XXXXXXX` and appears under Stream Details immediately after you create the Web Stream.

### Put measurement ID in docs.json [#put-measurement-id-in-docsjson]

Add your Measurement ID to your `docs.json` file like so:

```json title="docs.json"
"integrations": {
    "ga4": {
        "measurementId": "G-XXXXXXX"
    }
}
```

### Wait [#wait]

Google Analytics takes two to three days to show your data.

You can use the [Google Analytics Debugger](https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna?hl=en) to check your analytics configuration. The extension logs to your browser's console every time GA4 makes a request.

<Note>
  Preview links have analytics turned off.
</Note>
