How to Add Cookie Banner on Webflow Website

In this guide, we'll walk you through the CookiePal installation on a Webflow website

3 min read

CookiePal helps you ensure your Webflow website complies with GDPR, CCPA, LGPD, and other privacy laws by managing cookie consent for your users. This guide will walk you through adding the CookiePal script to your Webflow site by hand.

1

Sign in to CookiePal

Sign in: Go to CookiePal and sign in to your account.

2

Get the Installation Code

Generate Code: In your CookiePal dashboard, click on the HTML file icon to get the installation code. Refer to the gif below for detailed instructions on how to do this.

Copy Code: Copy the generated script code to your clipboard.

3

Check Your Webflow Plan

Custom code needs a paid plan: Webflow only lets you add custom code to a site with a paid Site plan, or to a site that belongs to a paid Workspace plan. If the Custom code settings are locked, upgrade the plan first.

4

Open Custom Code Settings in Webflow

Open Settings: In your Webflow dashboard, click the "..." menu on your site's card and choose "Settings". From the Designer, click the Webflow logo in the top left corner and choose "Site settings" instead.

Open Custom code: In the left menu of Site settings, click on "Custom code".

5

Add CookiePal Script to Head Code

Paste Script First: In the "Head code" box, paste the CookiePal script code as the first thing in the box. CookiePal must load before any other script so it can block cookies until the visitor gives consent. If the box already has code, put the CookiePal script above it.

Save Changes: Click "Save" to apply the code to your site.

6

Check for a Google Tag Set in Webflow

Check Apps & Integrations: In Site settings, open "Apps & Integrations". If a tag ID is set under "Google tag IDs", Webflow loads that Google tag natively and it can fire before the CookiePal banner applies the visitor's choice. To avoid this, remove the native tag and load Google Analytics through Google Tag Manager with Google Consent Mode set up instead. See the Google Consent Mode troubleshooting guide for details. Do this before the next step, because Webflow only applies Site settings changes when you publish.

7

Publish Your Site

Publish: Saving does not put the code on your live site. Click "Publish", select your domains (the webflow.io domain and your custom domain) and click "Publish to selected domains".

8

Verify Banner: Return to the CookiePal dashboard and verify that the cookie banner is active on your website. The status should change to "Active".

Test Implementation: Visit your live domain (not the Designer preview) to ensure the cookie consent banner appears correctly and cookies are blocked until user consent is given.

9

Remove CookiePal

Manual Install: If you pasted the script yourself, open Site settings and click on "Custom code" as in steps 5 and 6, delete the CookiePal script from the "Head code" box and click "Save".

CookiePal App: If you installed the CookiePal app, disconnect the site in your CookiePal dashboard, or uninstall the app in Site settings under "Apps & Integrations". Either way, the script leaves your live site the next time you publish.

Publish: Click "Publish", select your domains (the webflow.io domain and your custom domain) and click "Publish to selected domains". Until you publish, the banner stays on the live site.

Was this guide helpful?Thanks for letting us know.
Still stuck?Get in touch and we'll help you get your banner live.Contact us