Google Analytics
Track page views and events on your documentation site with Google Analytics 4.
Google Analytics 4 (GA4) tracks page views, user engagement, and custom events across your documentation site. Enable the integration to start collecting data with your existing GA4 property.
Prerequisites
-
A Google Analytics account with a GA4 property
-
Your GA4 measurement ID (starts with
G-) -
Publishing access to your documentation project
Configure from the Editor
Open Site Config
In the Editor, click Site Config in the top toolbar.
Navigate to Integrations
Select Integrations from the left sidebar.
Enable Google Analytics
Select Google Analytics and enter your GA4 measurement ID.
Publish
Click Publish to deploy the integration to your live site.
Configure via documentation.json
Add the ga key under integrations in your documentation.json:
{
"integrations": {
"ga": {
"measurementId": "G-XXXXXXXXXX"
}
}
}
| Property | Type | Required | Description |
|---|---|---|---|
measurementId | string | Yes | Your GA4 measurement ID (for example, G-XXXXXXXXXX) |
Where to find your measurement ID
-
Sign in to Google Analytics.
-
Go to Admin → Data Streams → select your web stream.
-
Copy the measurement ID displayed at the top (format:
G-XXXXXXXXXX).
What's next
-
Analytics and Chat Integrations — overview of all supported integrations
-
Google Tag Manager — manage multiple tags from a single container
-
Analytics overview — view traffic and engagement data for your documentation
Last updated 1 day ago
Built with Documentation.AI