Integrations
FFramer
implementation guidePlatforms and stores

Cookie banner for Framer with Google Consent Mode v2

Add the CookiePilot banner to a Framer site with custom code in Site Settings. Consent Mode v2 starts at the beginning of head, before Google tags, and the banner runs on the whole site after you publish.

Consent behaviour

You paste the code once in Site Settings and it runs on every page.

The Consent Mode v2 stub sets denied before GA4, GTM or Google Ads load.

The banner only loads on the domain added in CookiePilot, so the published site's address must match it.

Setup steps

In the CookiePilot panel, add the domain your Framer site runs on (your custom domain or the .framer.website address). Copy the install code from the Installation tab.

In Framer, open Site Settings → General → Custom Code and paste the code into “Start of <head> tag”.

Put GA4, GTM and other tools in “End of <head> tag”, so they run after the CookiePilot stub.

Publish the site. Custom code only runs on the published site, not in the editor preview.

Open the published site in a private window and check the banner and dataLayer.

To remove the banner, delete the code from Custom Code and publish again.

Example snippet

Example snippet
<script src="https://cdn.cookiepilot.io/stub.js"></script>
<script async src="https://cdn.cookiepilot.io/cookiepilot.js" data-cpkey="YOUR_SITE_KEY"></script>

Test checklist

The first dataLayer entry is consent default with denied values.

Before the visitor clicks, there are no _ga, _gcl or _fbp cookies.

After Accept, dataLayer contains consent update granted.

The banner shows on the published address that is added as a domain in CookiePilot.

Related integrations

See the setups that most often appear together with this integration.

Ready to configure it?

Start CookiePilot, choose the right integration and verify that tags wait for user consent before they run.