Integrations
Webflow setup
Install the consent banner on your Webflow site with site-wide head code
Add the GetCookies consent banner to a Webflow site with site-wide custom code.
Prerequisites
- A GetCookies account with a domain configured for your Webflow site's custom domain.
- Your Domain ID from the GetCookies dashboard (Domains > Widget Configuration).
- A paid Webflow site plan: Webflow only allows site-wide custom code on paid site plans.
Add the GetCookies script
The rule: the GetCookies script is the first script in `<head>`, above Google Tag Manager, gtag.js and every pixel, with no `async` or `defer`. Why: Google tags only use consent defaults that are set before they start, and GetCookies can only hold back trackers that start after it.
- In Webflow, open Site settings > Custom code.
- In Head code, paste this at the very top, above anything else already in the field (for example a Google Tag Manager or Meta Pixel snippet):
<!-- GetCookies: the FIRST script in <head>, before Google Tag Manager or gtag.js. No async or defer. -->
<script src="https://app.getcookies.co/api/v1/widget/loader.js"
data-domain-id="YOUR_DOMAIN_ID" data-cfasync="false"></script>- Replace
YOUR_DOMAIN_IDwith your Domain ID and click Save changes. - Publish the site. Custom code only runs on the published site, not in the Designer.
Do not add the script in Footer code, in an Embed element or in a page's own custom code: those run after the site-wide head code, so tags in it start first.
Tags added through Webflow's integrations
If you entered a Google Analytics or Meta Pixel ID in Webflow's integration settings instead of pasting the code yourself, Webflow adds that tag itself and decides where it loads. GetCookies holds back the Meta Pixel and sets Google's consent defaults only for tags that start after it.
Run the leak check after publishing (see below). If it lists one of these tags before consent, remove the ID from Webflow's integration settings and paste the tag's code into Head code below the GetCookies script, or move it into Google Tag Manager.
Tags GetCookies does not recognise
Known trackers in your head or footer code are held back automatically; see Automatic tracker blocking. For other tracking scripts, change type to text/plain and add the category, so they run only after consent:
<script type="text/plain" data-cookieconsent="marketing" src="https://example.com/pixel.js"></script>See data attribute blocking for the details.
Verify the Installation
- Open the page source of the published site (Ctrl+U, or Cmd+Option+U on a Mac). The GetCookies script must be the first
<script>in<head>, withoutasyncordefer. Scripts Webflow adds for its own integrations may sit above it; the leak check shows whether they matter. - In GetCookies, open your domain and run the leak check (Run now). It reports a GetCookies script that loads after Google Tag Manager, with
asyncordefer, or added by another script, and every tracker that ran before consent. - Open the site in an incognito/private window and confirm the banner appears.
- Accept, then check your GetCookies dashboard under Consent Logs to see the test consent recorded.
Troubleshooting
- No banner: check that the site is published, that the Domain ID matches the domain in GetCookies, and that your site plan runs custom code.
- A tracker loads before consent: make sure the GetCookies script is the first line of Head code, and move tags out of Webflow's integration settings as described above.
- Cloudflare in front of Webflow: keep
data-cfasync="false"on the script so Rocket Loader does not delay it.
Still stuck?
Email [email protected] with your domain and what you tried. Signed-in customers can also open a ticket from the dashboard.