Use Google Tag Manager with a published Confluence site

To use Google Tag Manager with a Confluence site published with Capable Sites, paste your container ID (GTM-XXXXXXX) into Google Tag Manager ID under Settings, Integrations. If you use the cookie banner, also turn on Tag Manager handles consent and trigger tags from the capable_consent events. Save, then Update and Promote.


#Before you start

  • You need to be a Confluence admin or a collaborator on the site, and able to publish your Tag Manager container.

  • Find the container ID in Tag Manager under Admin > Container Settings.

  • Tags in the container can only load scripts from Google. Tags that load scripts from other providers do not run on a published site.


#Steps

  1. In Capable Sites, open your site, select Settings, then the Integrations card.

  2. Paste your container ID into Google Tag Manager ID.

  3. If you need consent, turn on Cookie consent popup, then turn on Tag Manager handles consent.

  4. Select Save changes, then select Update and Promote on the site's Overview.

  5. In Tag Manager, open Admin > Container Settings and select Enable consent overview under Additional Settings.

  6. Create a Custom Event trigger for each category you use, with the event name capable_consent_analytics, capable_consent_marketing or capable_consent_functional.

  7. For Google tags, open Advanced Settings > Consent Settings and require the matching consent type, such as analytics_storage or ad_storage. For other tags, replace All Pages with the matching consent trigger.

  8. Select Submit to publish the container.

  9. Open your site in a private window, select Accept all, and type dataLayer in the browser console to see the capable_consent events.


#If it does not work

  • The container never loads for visitors who customise. Tag Manager handles consent is off, so the container waits for Accept all. Turn it on.

  • A tag fires before consent. Its trigger is still All Pages or Initialization - All Pages. Swap it for the consent trigger.

  • A third-party tag never runs. Its script comes from outside Google and is blocked. Contact Capable support if you need a provider allowed.



Set up consent once, in your container, for every page.