Install the TermsBox Cookie Consent Banner on Webflow
This guide shows you how to add the TermsBox consent banner to a Webflow website using site-wide custom code. It takes about 5 minutes.
What you need
- A TermsBox account with a site already created.
- Your install snippet. You get it from the TermsBox dashboard:
- Log in to TermsBox.
- Go to Consent Banner in the left menu.
- Open the Install tab.
- Copy the snippet shown there. It already has your site id filled in.
- A Webflow plan that allows custom code. Adding site-wide head code and publishing to a custom domain requires a paid Webflow Site plan. On a free Webflow account you can add the code, but you may only be able to publish to a
.webflow.iostaging URL.
Your snippet looks like this, but with your own site id in place of YOUR_SITE_KEY:
<script src="https://termsbox.com/cmp/termsbox-cmp.js" data-site-id="YOUR_SITE_KEY" data-auto-block="on"></script>Tip: always copy the snippet from your dashboard rather than typing it by hand. That way your real site id is included and correct.
Step by step
- Log in to Webflow and open your project in the Designer.
- Open Project Settings. You can reach it from the Designer menu, or from your Webflow dashboard by clicking the three dots on the project and choosing Settings.
- Click the Custom Code tab.
- Find the Head Code box (it may be labeled "Inside
<head>tag"). - Paste your TermsBox snippet into the Head Code box. This applies the banner to the whole site. The banner must load from the head so it can block trackers before they run.
- Click Save Changes.
- Click Publish and confirm. Custom code only takes effect on the published site, so you must publish for the banner to appear.
The code now runs on every page of your Webflow site.
Verify it works
- Open your published website in a normal browser tab.
- Reload the page. You should see the cookie consent banner appear.
- Go back to TermsBox, open Consent Banner > Install, and click Verify Installation. TermsBox will visit your site's main URL and confirm the snippet is present. When it succeeds you will see a "Verified" status.
Troubleshooting
The banner does not appear.
- Make sure you clicked Publish after saving. Head Code does not run until you publish.
- Make sure you pasted the snippet into Head Code, not the per-page Footer or Body code.
- Make sure you pasted the whole snippet, including the site id. If the
data-site-idpart is missing or empty, the banner will not work and you will not see an error.
"Verify Installation" says the script was not found.
- If TermsBox has your custom domain saved but you only published to the
.webflow.iostaging URL, the check may not find the code. Publish to the domain that matches the URL saved in TermsBox. - Wait a minute after publishing, then click Verify again.
- Confirm the site is public and not password protected.
- Make sure you did not add
asyncordeferto the snippet.
Do not change the snippet.
Paste it exactly as copied. Do not add async or defer. The banner needs to load in the head, before your other scripts, to block trackers correctly.