Add Google Analytics to Confluence
To add Google Analytics to Confluence, open Confluence Settings, then Google Analytics. Select Connect Google Analytics, choose your GA4 property and a Data stream, then select Save configuration. Page views from every reader, including logged-out readers of public pages, start arriving in Google Analytics straight away.
#Before you start
You need | Why |
|---|---|
Confluence administrator access | The Google Analytics configuration page is in Confluence settings. |
A Google account with access to a GA4 property | Connecting lets the app list your properties and data streams and read reports back into Confluence. |
A GA4 web data stream | The stream's measurement ID ( |
#Steps
Open Confluence Settings and select Google Analytics in the left-hand menu.
Under Connect Google, select Connect Google Analytics and sign in to Google in the popup.
Choose your property under GA4 property.
Under View tracking, pick a Data stream. This fills in the Measurement ID for you.
Select Save configuration. You should see Configuration saved.
You can skip connecting Google and type the ID with Enter a measurement ID manually instead. Page views are still recorded, but reports inside Confluence, enhanced tracking and custom dimensions all need the Google connection.
#What happens next
Readers pick up the new settings within about a minute. Google Analytics Realtime shows page views almost at once, but standard reports, and the reports inside Confluence, can take up to 48 hours to fill. The Feature status panel on the settings page shows what is switched on.
Then consider tracking searches, comments and edits and syncing custom dimensions.
#If it does not work
The save message says no measurement ID is set: pick a data stream or enter the ID, then save again.
Nothing arrives in Realtime: see Check Google Analytics is tracking Confluence.
#Related
Google Analytics settings
Every setting on the configuration page.
Site-wide page view tracking
How page views are recorded.
Track Confluence searches, comments and edits in Google Analytics
Searches, comments, edits and reactions.
Check Google Analytics is tracking Confluence
Make sure events are arriving.
Five steps, and Confluence is in Google Analytics.
