Add a Google Analytics report to a Confluence page
To add a Google Analytics report to a Confluence page, edit the page, type /Google Analytics and insert the macro. In its settings choose a View (Overview, Current page, Content or Spaces), a Date range, and for charts a Granularity and Metric. Publish, and the report stays live.
#Before you start
You can edit the page.
An admin has connected Google and chosen a GA4 property.
Readers only see the figures if they are allowed to view reports. Everyone else sees a short message instead. See Choose who can view Google Analytics reports in Confluence.
#Steps
Edit the page, type /Google Analytics and choose Google Analytics.
Under View, choose Overview, Current page, Content or Spaces.
Under Date range, choose Last 7 days, Last 30 days or Last 90 days.
For Overview or Current page, choose a Granularity (Day, Week or Month) and a Metric (Views, Sessions or Users).
For Overview or Content, optionally pick a Space, or leave Whole site.
Publish the page.
#What happens next
The macro reads its figures from your Google Analytics property. The app keeps each report for up to an hour, so very recent views can take a while to show. Current page always reports on the page the macro sits on, so you can copy it into a template and every new page reports on itself.
#If it does not work
No page context: Current page only works on a page or blog post.
Connect Google to load this view's report data.: the Google connection is missing or has expired. A Confluence admin needs to reconnect it in the settings.
A reader sees You do not have access to analytics for this site.: that reader is not in the allowed audience.
#Related
The numbers where the team already reads.
