Webflow makes it easy to add tracking and just as easy to add it twice. This guide covers the Webflow-specific parts of a clean setup. For containers, naming and permissions in general, start with our Google Tag Manager setup guide for startups, and for the reporting side, our GA4 setup guide for marketing websites.
How do you add Google Tag Manager to Webflow?
You add Google Tag Manager to Webflow by pasting the container's two snippets into the site-wide custom code fields in Site settings: the script in the head code and the noscript part at the start of the body (Webflow's footer field is the closest fit, and the noscript fallback matters little for modern browsers). Publish, and the container loads on every page.
Put it in Site settings, not in a page's custom code or an Embed element, so every page and CMS template gets exactly one copy. Custom code fields depend on your Webflow site plan, so check Webflow's current plan page if the fields are locked. Use a company-owned Google account for the container and add a second admin, so tracking doesn't leave with a freelancer.
Should you use Webflow's native Google Analytics integration or GTM?
Use one or the other, never both. Webflow's built-in Google Analytics integration is fine if GA4 page views are all you need. As soon as you want form conversions, ad pixels or consent rules, move GA4 into GTM and clear the measurement ID from Webflow's integration settings.
Setup | Good for | Limits |
|---|---|---|
Webflow native GA integration | Basic page views on a brochure site | No custom form events, no other tags, consent handled elsewhere |
GTM in Site settings custom code | Most startup marketing sites | Needs an owner and naming rules |
Both at once | Nothing | Double-counted page views and sessions |
Tags pasted into page embeds | Nothing | Missed pages, duplicates on templates, hard to audit |
If you're not sure what's installed today, open the published site, open DevTools, filter the Network tab for collect requests and load one page. More than one GA4 page view request per load means a duplicate. Our guide to GA4 not tracking conversions covers the other symptoms.
How do you track Webflow form submissions with GTM?
Track Webflow form submissions with GTM by pushing a data layer event when the form's success message becomes visible, then using that custom event as the only trigger for your conversion tags. Webflow's native forms don't push data layer events themselves, and GTM's built-in form trigger often misfires because Webflow submits forms with JavaScript.
When a native Webflow form submits successfully, Webflow hides the form and shows its success state (the Success message block). A short site-wide script can watch every form wrapper and push an event like generate_lead the moment that block appears. Include the form's name and the page path as parameters, so one event covers every form on the site.
Name every form in the Designer
Give each form a clear name in its settings, such as demo-request or newsletter. That name becomes your form_name parameter, so reports can tell the forms apart.
Add one listener script site-wide
In Site settings footer code, add a script that observes each form block and pushes dataLayer.push({event: 'generate_lead', form_name: ..., page_path: ...}) once its success message is shown.
Create the trigger in GTM
Add a Custom Event trigger for generate_lead and Data Layer Variables for form_name and page_path. Name them to your convention, such as Trigger - CE - generate_lead.
Attach your tags
Point the GA4 event tag and any ad conversion tags at that one trigger. Mark generate_lead as a key event in GA4, but only for forms that are real leads.
Test in Preview on the published site
Submit a real test entry, confirm the event shows once in Tag Assistant with the right parameters, then submit a broken entry and confirm nothing fires.
What about embedded forms like HubSpot or a scheduler?
Third-party forms embedded in Webflow don't show Webflow's success state, so the listener above won't see them. Most form and scheduling tools send a browser message or a callback when a submission or booking completes. Listen for that event in your site-wide script and push the same kind of data layer event, with a different form_name.
For example, suppose your demo form is a HubSpot embed and bookings run through a scheduler. You'd push generate_lead from the form's submit callback and book_meeting from the scheduler's booking-confirmed message. Check each vendor's current developer docs for the exact event name, because these change. Our conversion tracking guide for lead-gen websites covers which outcomes deserve to be key events.
How do you build a Webflow data layer for CTA clicks?
Build a Webflow data layer for CTA clicks by tagging important buttons with a custom attribute in the Designer and pushing one generic cta_click event with the attribute's value. That way marketers add tracking to a new button in Webflow, without touching GTM or code.
In Webflow, select a button, open its element settings and add a custom attribute such as data-track with a value like pricing-hero-demo. The site-wide script listens for clicks on any element with that attribute and pushes cta_click with the value as a cta_name parameter. In GTM, a single trigger and a single GA4 event tag cover every tracked button.
- Track intent, not everything. Hero CTAs, pricing plan buttons and the main nav demo button are worth it; footer links usually aren't.
- Use stable values. Name by location and purpose, not by button text, so a copy change doesn't break reports.
- Keep CTA clicks diagnostic. They explain the path to a lead, but they are not conversions and shouldn't be key events.
- Write it down. Add every event and parameter to a website tracking plan so the next person knows what exists.
How do you handle consent with GTM on Webflow?
Handle consent on Webflow by loading your consent management platform through GTM's Consent Initialization trigger, or directly in the head code above the GTM snippet, so default consent states exist before any Google tag fires. The banner then sends an update when the visitor chooses, and tags respond to it.
The Webflow-specific risks are timing and duplication. A cookie banner installed from a Webflow app or embed, plus a CMP template inside GTM, can set conflicting defaults. Pick one path and remove the other. Also check the webflow.io staging domain: if it's publicly reachable, tags fire there too, so either apply the same consent setup or exclude the staging hostname in your triggers.
Our Consent Mode v2 guide explains the four parameters, the basic versus advanced choice and the race conditions that quietly delete conversions. Decide the mode with whoever owns privacy for the business before you build.
How do you test GTM on a Webflow site before publishing?
Test GTM on a Webflow site by publishing to the webflow.io staging domain, opening GTM Preview against that URL and walking through every tracked action: page load, each form success, each failed form, each tracked CTA and the consent choices. Only publish the GTM container version after every event shows once with the right parameters.
- Page load: one GA4 page view, with the consent state set on the first event.
- Form success: generate_lead fires once, with the right form_name and page_path.
- Form failure: submit with a missing required field and confirm nothing fires.
- CTA clicks: each tagged button pushes cta_click with its own cta_name.
- Consent: rejected visitors don't trigger marketing pixels; accepted visitors do.
- GA4 DebugView: events arrive with parameters you can register as custom dimensions.
Write a short version note in GTM for every publish, and repeat the checklist whenever a form, template or banner changes. Tracking breaks most often during redesigns and platform moves, which is why our analytics continuity plan for migrations lists every event to rebuild and retest.
What usually breaks Google Tag Manager on Webflow?
Google Tag Manager on Webflow usually breaks when someone changes the site without re-testing tracking: a renamed form, a new form block pasted from another page, a CMS template rebuilt from scratch or a second analytics install added through a Webflow app. None of these produce an error, so conversions just drop.
- Duplicated forms keep old names, so two forms report as one.
- New templates miss the attribute on their CTAs, and clicks stop appearing.
- A Webflow app adds its own GA4 tag next to the one in GTM.
- Staging traffic from the webflow.io domain mixes with production data.
- Heavy tags in the container slow interactions; see our Core Web Vitals fixes for Framer, Webflow and Next.js.
A quarterly review of the container, and a monthly look at key events by form in a marketing website KPI dashboard, catches most of these. For more on what we set up as a GTM integration, see our Google Tag Manager integration page.
