Analytics and consent integration · Updated November 15, 2026
Google Tag Manager integration
Google Tag Manager loads your analytics and ad tags from one container, so new tracking doesn't need a code release. We install GTM on WordPress, Webflow, Astro, Next.js or custom software, write a data layer your developers own, and make consent the first thing the container reads.
Google Tag Manager at a glance
- Connects
- GA4, Google Ads, the Meta Pixel and most analytics and ad tags, through web or server containers.
- WordPress
- Site Kit by Google can create and install a container, or a short snippet goes in the theme.
- Webflow
- Google's site tools app installs a container; page-level custom code limits it to the pages that need it.
- Astro or Next.js with Sanity
- The GoogleTagManager component in Next.js or a layout snippet in Astro; components push to the data layer.
- Custom software
- A data layer spec your app writes to, and a server container for events your backend confirms.
- Complexity
- Medium. Installing is quick; a data layer and consent rules need developer time.
- Typical setup
- 1 to 2 days for a container with consent and GA4, 5 to 10 days for server-side tagging.
How we connect Google Tag Manager
WordPress
Site Kit by Google can create the container and add it for you. We use that or a small theme snippet rather than a third-party GTM plugin. Each form plugin reports success its own way, so we push one named data layer event from each form's success hook instead of trusting a generic form listener.
Webflow
Google's site tools for Webflow app connects a Tag Manager container. Webflow's own help suggests loading GTM only on the pages that use it, through page-level custom code, and using native integrations where they exist. Page custom code needs a paid Site plan or a paid Workspace. We add a short script that pushes an event when a Webflow form submits successfully.
Astro or Next.js with Sanity
In Next.js, the GoogleTagManager component from @next/third-parties loads the container, sendGTMEvent pushes to the data layer, and the script URL can point at your own tagging server. In Astro the snippet goes in the base layout. Partytown can move GTM off the main thread, but it needs dataLayer.push forwarded and some tags need proxying, so we test before relying on it.
Custom software
We write a data layer spec: event names, parameters and the moment each fires. Google's docs warn that the dataLayer name is case-sensitive and that variable names must match on every page. For events your backend confirms, a server container receives them and forwards them to GA4, Google Ads or Meta.
What organizations use Google Tag Manager for
Consent before any other tag
Every web container has a Consent Initialization trigger that fires before all other tags, including Initialization triggers. We put the banner's default consent there, set each tag's consent checks, and use the Consent overview screen to find tags nobody configured.
Lead events from confirmed actions
On papercrane.ca, GTM sends the GA4 generate_lead event only when a booking completes, never on a thank-you page view. We build your container the same way, so reloads and direct visits to a thank-you URL don't count as leads.
Server-side tagging
A server container takes one request per event from the browser and sends vendor requests from your own domain. As of November 15, 2026, Google's Cloud Run guide puts each server at about US$45 a month (1 vCPU, 0.5 GB) and recommends at least 2, plus logging. Google tag gateway is a lighter step that serves Google's tag from your domain.
What to watch out for
Every tag costs page speed
Each tag adds scripts to every page it fires on. Webflow's performance help says to delete unused tags rather than pause them and to scope triggers to the pages that need them. We audit the container in Preview mode before adding anything new.
Custom HTML ignores consent mode
Google's tags have built-in consent checks; a Custom HTML tag holding another vendor's snippet does not. We set Require additional consent on each one, so a pasted pixel can't fire before the visitor agrees.
Publish rights reach every page
Anyone who can publish the container can add a script to every page without a code review. We keep publish rights to a named few, work in workspaces, and note each version so a bad change rolls back in one step.
Sources
Checked against Google's Tag Manager docs on November 15, 2026.
- Consent configuration in Tag Manager Consent Initialization, consent checks
- The data layer
- Server-side tagging on Cloud Run US$45 per server, 2 minimum
- Google tag gateway for advertisers
- Consent mode overview
- Webflow: slim down Google Tag Manager
- Webflow: connect Google site tools
- Site Kit by Google
- Next.js third-party libraries GoogleTagManager, sendGTMEvent
- Astro Partytown integration
- Quebec private sector privacy act (Law 25)
Questions about Google Tag Manager
Is Google Tag Manager the same as GA4?
No. GA4 stores and reports data. GTM is the loader that decides which tags run and when. GA4 works without GTM; GTM is worth adding once several tools or teams need tags on the site.
Does server-side tagging get around consent?
No. It changes where tags run, not what visitors agreed to. Under PIPEDA and Quebec's Law 25, the visitor's choice still decides what you collect, and we pass the consent state through with each event.
Who should own the container?
Your organization. We create it under your Google account and get added as users, so it stays with you if you change agencies.
Related integrations
Cookiebot
Cookiebot is Usercentrics' consent management platform for small and mid-sized sites, with a cookie scanner, consent banner, automatic blocking and Google Consent Mode.
Cookiebot integrationCookieYes
CookieYes is a consent management platform with a cookie scanner, banner templates, automatic and manual script blocking, and Google Consent Mode v2 support.
CookieYes integrationFathom Analytics
Fathom Analytics is a paid, cookieless website analytics service run by Conva Ventures Inc. of Victoria, British Columbia.
Fathom Analytics integrationGoogle Analytics 4
Google Analytics 4 is Google's web and app analytics product. It measures visits as events and processes them on Google's servers, with no documented option to keep data in Canada.
Google Analytics 4 integrationMeta Pixel and Conversions API
The Meta Pixel is Meta's browser code for measuring Facebook and Instagram ads. The Conversions API is its server-to-server counterpart.
Meta Pixel and Conversions API integrationMicrosoft Clarity
Microsoft Clarity is Microsoft's free behaviour analytics tool, with session recordings, click and scroll heatmaps, and a GA4 connection.
Microsoft Clarity integrationWebsite development
Sites shipped with a documented data layer and a lean Tag Manager container.
Website developmentSEO and GEO
Search reporting built on Tag Manager events that match real leads.
SEO and GEOGrowth-stage companies
Tag Manager setups for marketing teams adding ad platforms fast.
Growth-stage companies
Cleaning up a Tag Manager container?
Give us read access to the container. We'll list what fires on each page, what can go, and what consent each tag needs.
Book a call