By Shaheer Malik · Source: Framer Help: Add Google Tag Manager to your site, read on 29 October 2026
Quick answer: Install Google Tag Manager on Framer by adding its two snippets as custom code: the first at the start of the head and the second at the start of the body, both on all pages and set to run once. Then create a Google Tag with your GA4 Measurement ID inside Tag Manager.
How to connect Google Tag Manager to Framer
- Create a Tag Manager container and copy its two snippets
- In Framer, open Site Settings, Code, and add the first snippet: placement start of head, all pages, run once
- Add the second snippet: placement start of body, all pages, run once
- In Tag Manager, create a Google Tag with your GA4 Measurement ID and the Initialization, All Pages trigger
- Use Tag Manager's Preview to connect to the published site, then check GA4's DebugView for page_view events
Good to know
- Framer's help also has a guide to tracking click events with Tag Manager
- If Preview will not connect, Framer suggests the Tag Assistant Companion browser extension
- Do not also paste the GA4 ID into Framer's built-in field, or page views may be counted twice
How custom code works in Framer
Framer's Custom Code section, in Site Settings, is where tracking scripts and chat widgets go. Framer's help lists analytics and marketing tags, chat and support widgets, small CSS and JavaScript tweaks, and structured data as its uses. For each snippet you choose:
- Placement: the start or end of the head, or the start or end of the body
- Pages: every page, or only the pages you select, including CMS pages
- When it runs: once, or on every page visit
Before you add tracking
- Check the consent rules for where your visitors are, and add a consent banner if you need one
- Mask typed text in any tool that records sessions
- Install each tool once, so page views are not counted twice
- Test on the published site, not the editor preview, and watch page speed after adding scripts
At a glance
| Tool | Google Tag Manager |
|---|---|
| Category | Analytics |
| How it connects | Custom code |
| Where in Framer | Site Settings, Code: two snippets |
Google Tag Manager and Framer questions
Where do the Tag Manager snippets go in Framer?
In Site Settings, Code: the first at the start of the head and the second at the start of the body, both on all pages and set to run once.
Can I track button clicks in Framer with Tag Manager?
Yes. Framer's help centre has a separate guide to tracking click events with Google Tag Manager.
Related integrations
- Google Analytics and Framer: a built-in setting
- Google Search Console and Framer: a verification meta tag
- Microsoft Clarity and Framer: custom code
Every integration is on the integrations page. If you would rather have the site built with this already connected, the Framer website sprint is $1,999 fixed for 14 days.
Want it connected for you?
I design and build Framer sites with analytics, forms and integrations set up, for a fixed $1,999 in 14 days.