# Add Google Analytics to a published Confluence site To add Google Analytics to a Confluence site published with Capable Sites, open the site's **Settings**, choose **Integrations**, paste your GA4 measurement ID (it starts with `G-`) into **Google Analytics ID** and select **Save changes**. Then run Update and Promote. Every published page then sends page views to your Google Analytics property. --- ## Before you start * You need to be a Confluence admin or a collaborator on the site. * Find your measurement ID in Google Analytics under **Admin** \> **Data Streams**. * The Google Analytics macro on a Confluence page does not run on a published site. Use this setting instead. --- ## Steps 1. Open Capable, choose **Sites**, open your site, and select **Settings**, then the **Integrations** card. 2. Under **Analytics**, paste your ID into **Google Analytics ID**, such as `G-XXXXXXXXXX`. 3. Optionally, turn on **Capable analytics integration** to see published page views in Capable's Google Analytics reports beside the same pages' views in Confluence. 4. If you need visitors' consent first, turn on **Cookie consent popup**. 5. Select **Save changes**. 6. On the site's **Overview**, select **Update**, wait for it to finish, then select **Promote**. 7. Open the live site and check your visit in the Google Analytics **Realtime** report. --- ## If it does not work * **No visits show up.** The setting only reaches the live site after Update and Promote. Check you promoted after saving. * **Some visitors are missing.** With the cookie banner on, Google Analytics waits for a visitor to allow Analytics. Visitors who reject it are not counted. * **The site is protected.** Analytics still works for signed-in visitors. The sign-in page itself is not tracked. --- ## Related ### [Integrations and cookie consent](https://help.gocapable.com/sites/integrations-and-cookie-consent.html) Every integration and how consent gates it. ### [Add a cookie consent banner to a Confluence site](https://help.gocapable.com/sites/add-a-cookie-consent-banner-to-a-confluence-site.html) Ask visitors before analytics loads. ### [Use Google Tag Manager with a published Confluence site](https://help.gocapable.com/sites/use-google-tag-manager-with-a-published-confluence-site.html) Run GA and other tags from a container. ### [Analytics, cookies and consent](https://help.gocapable.com/sites/analytics-cookies-and-consent.html) More analytics and consent guides. --- _Paste the ID, publish, watch the visits arrive._