How to Add a Framer Cookie Banner That Blocks Trackers

How to Add a Framer Cookie Banner That Blocks Trackers

You add a Framer cookie banner by pasting one ConsentLayer script tag into the Framer site’s head code settings and then publishing the site. From then on the banner holds trackers until consent and records every decision, so your client’s site is protected once that tag is live on the real domain.

What a working Framer cookie banner needs

A cookie banner on a Framer site does its job only when three conditions hold at once. The consent tag has to load on every page of the published site, ahead of any analytics, ad or marketing script, so nothing that sets cookies runs before it.

Trackers then have to stay off until the visitor clicks Accept or picks categories. A Google Analytics or Meta Pixel request should appear in the browser only after that click. Each choice also has to be stored as a record, so you can show the client how consent was collected if a customer or a regulator asks.

A banner that only displays a message fails the second condition, because the scripts behind it still load on page view, and EU rules expect consent before non-essential cookies are set. On Framer, the practical route is a consent tag placed at the start of the head through the project’s custom code settings. After that you publish and test on the live domain in a private browser window, where no earlier choice is saved and the banner has to appear.

What you need before you add the banner

Have these open before you start, so you don’t stop halfway through the head code step:

  • the client’s Framer project, with permission to change its project settings
  • a ConsentLayer account for your organization
  • either the AI you already use or the ConsentLayer dashboard

Write down the client’s live domain as well. Every check at the end runs on that domain and not on the Framer editor.

Framer’s Cookie Banner component or a script tag

Framer ships its own Cookie Banner component, and it’s designed to work with Google Tag Manager and Google Consent Mode, so the consent signal travels through a GTM container. The component can also control behavior separately for the EU and for the rest of the world, which suits a client who wants a strict banner in Europe and a lighter one elsewhere. The ConsentLayer tag gives you Google Consent Mode v2 without a GTM container, and the tag itself holds trackers until consent.

Framer’s component fits a client who already runs all their tracking through GTM, since the consent setup then lives in the same place. The ConsentLayer tag fits a site with a few scripts pasted straight into custom code, where nothing has to move into a container first. If you’re weighing more tools than these two, choosing a consent management platform for client sites sets out what to compare.

Framer component or ConsentLayer tagFramer Cookie BannerConsentLayer
InstallNeeds a valid Google Tag Manager container IDOne script tag pasted into the head code settings
Google Consent ModeBuilt to work with Google Tag Manager and Google Consent ModeGoogle Consent Mode v2 on every plan, including Free

Add the ConsentLayer tag to Framer, step by step

1. Create the site in ConsentLayer and get the tag

Ask your agent for the site in one prompt, with the client’s real domain in it: “Set up ConsentLayer for northfieldbakery.com and give me the install snippet.” Your agent calls setup_site, one tool call that creates the site and scans it. The same call configures consent categories and returns the tag with a real project key. If your agent isn’t connected yet, set it up from your agent before your first client site.

Without an agent, add the site with its domain at app.consentlayer.com and copy the tag the dashboard shows.

2. Paste the tag at the start of the Framer head

In Framer, open Project Settings and go to the Custom Code tab. Click Add Script and give it a name the next editor will recognise, such as “ConsentLayer banner”. Set its placement to the start of <head> and keep it running on every page. Paste the tag exactly as you copied it and keep it above every other script, because it must load synchronously, with no defer and no async, before the scripts it controls.

Read the pasted line once before you save: an editor who tidies the head out of habit sometimes adds async to every script, and that one word lets trackers start first.

3. Publish the Framer site

Click Publish and then open the client’s live domain, not the editor preview. Framer itself advises verifying the cookie setup on the published site before relying on it for analytics or marketing tags. Use a private window for that first visit, since a normal window may keep a choice you made while testing and hide the banner from you.

The same thing catches clients after handover: they accept on their own laptop once, the banner never returns for them, and they report it as broken. Tell them about the private window before they find out themselves.

Then check that the banner shows on the live site in a private window.

Check that the banner works

Start with your agent: “Check the ConsentLayer installation on northfieldbakery.com.” It runs check_installation, which fetches the live homepage and confirms the tag is in <head> without defer or async.

Then confirm by hand that trackers wait for the visitor:

  1. Open the live site in a private window and open the browser’s developer tools on the Network tab.
  2. Type “collect” or “facebook” into the Network filter and reload the page.
  3. Leave the banner alone and confirm that no Google Analytics or Meta Pixel request appears.
  4. Click Accept and watch those requests start in the Network tab.

Keep a screenshot of steps 3 and 4 for the client file. It shows the trackers that did not fire before the visitor chose.

Common problems on Framer sites and their fixes

The banner shows on some pages only

The tag was limited to certain pages in Framer’s custom code, so visitors on the other pages see no banner and nothing is held for them. Run this check:

  1. Select the ConsentLayer banner script.
  2. Change its page setting from specific pages to all pages.
  3. Publish, then open a page that had no banner in a private window.

Analytics fire before the visitor chooses

Static scripts already in the page are execution-blocked until consent, so a tracking script pasted into the HTML waits once the ConsentLayer tag loads before it. An early request means the tag doesn’t load first on that page, or you’re testing the editor preview and not the live domain.

Take a client site where a Meta Pixel script went into the head custom code a year before the banner. Meta Pixel is one of the built-in blocking patterns in the Marketing category, so a request to facebook.com on page load means the pixel sits above the tag. Fix the placement as in step 2, then publish and test again in a private window on the live domain.

A YouTube video or Google Map loads before consent

The visitor sees a click-to-load placeholder in place of the embed until they consent, so a client’s video or map does not set cookies on page load. That covers embeds from YouTube, Vimeo, DailyMotion, Google Maps, reCAPTCHA, X and Instagram, as part of ConsentLayer’s script and content blocking. When a video plays straight away instead, the tag isn’t running on that page yet.

  • Tell the client before launch that the contact page map shows a placeholder until a visitor consents, or they’ll report it as a broken map.
  • Test any form that uses reCAPTCHA after you click Accept, because the reCAPTCHA check waits for consent too.

Framer cookie banner FAQ

Can I add a cookie banner to a Framer site for free?

The Free plan costs $0 forever with no credit card, and it includes 1 site, 10,000 pageviews per month, 1 team member, 1 banner language and a 30-day consent log. When your roster grows, the Studio and Agency ConsentLayer plans pool one pageview allowance across every site in the organization.

Does Framer’s Cookie Banner need Google Tag Manager?

Framer’s component asks for a valid Google Tag Manager container ID during setup. The ConsentLayer tag works without a container, and its Free plan covers 1 site and 10,000 pageviews per month at $0 forever, with no credit card.

Do I need to update the code in Framer when I change the banner?

No, the tag never changes after install, because banner.js is regenerated on every save. Colour, wording or category edits you save in ConsentLayer reach the published Framer site without anyone opening its custom code again.

Can visitors change their cookie choice later?

A floating reopen button lets visitors change their decision at any time. You choose one of 4 icons for it, so it suits the client’s design.

Going further with the next Framer site

Once one client’s Framer site is set up the way you want, export its full configuration as JSON and import it into another site, which carries over the design, behavior, categories, services, cookies, translations and geo groups. Create the next client’s site first and import the JSON into it. Then paste that site’s own tag into its Framer head.

To check the import, open the new live domain in a private window and compare its banner with the first client’s. Then ask your agent to run the installation check on the new domain. Repeating those steps per site is how cookie consent for your client roster stays a short routine.

Create the site in ConsentLayer and paste its tag into the next Framer site’s head code, following the quick start.