Consent behaviour
You paste the code once in Site settings → Custom code and it runs on every page of the published site.
You control the order in the Head code field: CookiePilot at the top, GA4, GTM and other tags below it.
The banner only loads on the domain added in CookiePilot, so the published site's domain must match it.
Setup steps
In the CookiePilot panel, add the site's domain (custom or the .webflow.io address) and copy the install code.
In Webflow, open Site settings → Custom code and paste the code at the very top of the Head code field, before any other script.
Paste Google Analytics and GTM into the same field below the CookiePilot code. Leave the Google Analytics field in Site settings → Integrations empty, so the tag does not load twice and outside your control of the order.
Save and publish the site. Custom code needs a paid site plan or a workspace plan that includes custom code.
Open the published site in a private window and check it using the checklist.
To remove the banner, delete the code from Head code and publish again.
Platform limitations
Webflow Analyze and Optimize have their own consent API (the wf.* functions). CookiePilot does not call it, so if you use those tools, pass the decision to them with your own code.
Webflow does not document the order of the native Google Analytics integration relative to Head code. That is why we recommend GA in Head code below CookiePilot.
We have not verified whether Head code runs on Webflow Ecommerce checkout pages. Check the banner on the cart, at checkout and on /order-confirmation.
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
In the page source, stub.js is the first script from Head code, before gtag.js and gtm.js.
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 and GA4 sends page_view.
Related integrations
See the setups that most often appear together with this integration.
Framer
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.
Squarespace
Add the CookiePilot banner to a Squarespace site with header Code Injection. You paste the CookiePilot code at the top of the Header field and Google Analytics and GTM below it. You turn off the built-in Squarespace banner and replace the native Google Analytics connection with a tag below the stub.
Google Tag Manager
Consent Initialization, dataLayer and tag rules.
Google Analytics 4
Analytics consent, _ga and cookieless pings.
Ready to configure it?
Start CookiePilot, choose the right integration and verify that tags wait for user consent before they run.