Cookie consent for Framer
Framer lets you add code to the start of <head> on every page from the site settings. That is all the banner needs, and analytics added the same way can wait for the visitor's choice.
Set it up with your AI agent
Connect the Croombit MCP server to your editor or coding agent and paste this. It creates the site, the cookie categories and the banner, and edits your code.
Using Croombit: create a site for this project and keep the cookie categories it comes with. Write the banner text and publish the banner. Create a TEST publishable key for localhost:3000. We use Framer: give me the exact snippets to paste into Site Settings → General → Custom Code, at the start of <head>, with our analytics tags already set to type="text/plain" and data-tc-consent.The agent works in TEST. Going live takes two steps in the console: verify your domain and swap in a LIVE key — see going live.
Or by hand
1. Site Settings → General → Custom Code
Paste the tag under Start of `<head>` tag and publish. It is on every page from then on.
<script src="https://croombit.com/cmp.js"
data-tc-api-key="pk_live_…"></script>2. Add analytics through Custom Code too
To hold Google Analytics back until consent, add it under the banner, tagged, rather than through an integration that inserts it on its own terms:
<script type="text/plain" data-tc-consent="analytics" async
src="https://www.googletagmanager.com/gtag/js?id=G-XXXX"></script>
<script type="text/plain" data-tc-consent="analytics">
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXX');
</script>3. Cookie list and settings link
Use an Embed component on your cookie policy page, and another in the footer:
<div data-tc-cookie-declaration></div>
<a href="#" data-tc-open-preferences>Cookie settings</a>Questions
Framer has its own cookie banner. Do I turn it off?
Yes, if you enabled it — visitors should see one banner, and only Croombit records each decision with proof.
Does it work on the framer.app or framer.website staging domain?
Yes, with a TEST key whose allowlist includes that domain. Switch to the LIVE key on your verified custom domain.
Related
- Cookie consent for any website
- Cookie consent for Next.js
- Cookie consent for React
- Cookie consent for Vue and Nuxt
- Cookie consent for Astro
- Cookie consent for SvelteKit
- Cookie consent for React Router and Remix
- Cookie consent for Laravel
- Cookie consent for Django
- Cookie consent for Ruby on Rails
- Cookie consent for WordPress
- Cookie consent for Webflow
- Cookie consent for Hugo and Jekyll
- Guide: cookie banner
- Console: Cookies (scanner)
- TCF, Consent Mode and GPP
- Google Consent Mode v2: basic vs. advanced