Last updated September 12, 20263 min read

Install GTM, GA4 and Clarity Behind Consent

Outcome

One container, three tools, and a consent rule that holds in Europe: install Tag Manager once, fire GA4 through it, add Clarity beside it, and verify before you publish the container.

Three ice figures on floating ice - a chart with a blue flame, an eye and a shield with a tick - under the title Measure From Day One.

Share this guide

Share this guide on LinkedIn

Summarize with AI

ChatGPTPerplexityClaude
Table of Contents

Steps

Guide

  1. Install GTM as the single control point

    Google's current Tag Manager setup flow still starts with one simple rule: install the container snippets once, then manage your tags from Tag Manager instead of hardcoding every vendor separately. The first GTM snippet goes as high in the <head> as possible. The second snippet goes immediately after the opening <body> tag.

    Treat GTM as the control room for the website intelligence layer. If each tool is installed separately across templates, plugins, or ad hoc code edits, the setup becomes harder to test and easier to break. One container gives you one place to preview changes, one place to name versions, and one place to review what actually changed.

    Do not publish an empty container and disappear. Name the first version in plain English, such as initial website intelligence layer, so future review does not start with archaeology.

  2. Connect GA4 and Clarity through the same hub

    After the container is installed, add the Google tag inside GTM and fire it on Initialization - All Pages. Google documents this as the standard path when you want Tag Manager to control Analytics instead of hand-editing website code repeatedly. Then use Preview in Tag Assistant, connect to the live site, and confirm that the tag is detected and that events are being sent before you publish the container version.

    Add Microsoft Clarity in the same operational layer. Clarity's manual installation still requires access to the <head> section, and each project has its own tracking code. In practice, the safer team workflow is to keep the website-wide installation decision inside GTM or at least document it beside GTM, GA4, and consent handling so one person can audit the full layer without hunting through several systems.

    For European projects, do not treat consent as a late legal footnote. Microsoft states that Clarity is enforcing consent signal requirements for EEA, UK, and Swiss traffic. If you work in those regions, the launch checklist must include how consent is passed, not only whether the script exists.

About the author

Nikita Goncharenko

Nikita Goncharenko

AI Fast Integrator

Nikita Goncharenko uses AI as a practical delivery layer for research, coding, documentation, content systems, and faster decisions.