TermsBox
PricingBlog
LoginGet Started
PricingBlogLogin
Get Started
  1. Home
  2. Install guides
  3. Shopify

Install the TermsBox Cookie Consent Banner on Shopify

This guide shows you how to add the TermsBox consent banner to a Shopify store by editing your theme code. It takes a few minutes and does not require a developer.


What you need

Before you start, get your install snippet from your TermsBox dashboard:

  1. Log in to your TermsBox account.
  2. Go to Consent Banner in the left menu, then open the Install tab. (Direct link: /dashboard/banner.)
  3. You will see a ready-to-copy script tag. Click the copy button.

Your snippet looks like this, with your own site id already filled in:

<script src="https://termsbox.com/cmp/termsbox-cmp.js" data-site-id="YOUR_SITE_KEY" data-auto-block="on"></script>

Notes:

  • YOUR_SITE_KEY is your unique site id. The dashboard fills this in for you automatically, so always copy the snippet from there rather than typing it by hand.
  • The snippet is also shown during first-time setup, on the "Getting Started" card on your dashboard home, and on the success page after checkout. It is not shown under Settings, so look under Consent Banner if you cannot find it.

Where the snippet goes

On Shopify you add the script to your theme's theme.liquid file, inside the <head> section. Because theme.liquid is used on every storefront page, this makes the banner appear across your whole store.

Important: do not add async or defer to the script tag. The banner needs to run early and in order to block trackers before they fire. The copy-paste snippet is already correct. Just paste it exactly as given.


Step by step

  1. In your Shopify admin, go to Online Store > Themes.

  2. Find your current live theme. Click the three dots (or the ... menu) next to it, then click Edit code.

  3. In the file list on the left, under the Layout folder, click theme.liquid to open it.

  4. Find the closing head tag near the top of the file. It looks like this:

    </head>

    Tip: press Ctrl+F (or Cmd+F on Mac) inside the editor and search for </head> to jump straight to it.

  5. Click on the line directly above </head> and paste your TermsBox snippet there. Replace YOUR_SITE_KEY with your real site id if it is not already filled in:

    <script src="https://termsbox.com/cmp/termsbox-cmp.js" data-site-id="YOUR_SITE_KEY" data-auto-block="on"></script>
    </head>
  6. Click Save in the top right.

Your banner is now installed across your storefront.

A note about checkout pages

The steps above cover all your normal storefront pages (home, product, collection, cart, and so on). Shopify's checkout pages are separate and locked down. On standard Shopify plans you cannot add custom scripts to checkout, so the banner will not appear there. Only Shopify Plus merchants can customize checkout (through checkout settings or checkout.liquid). If you are on Shopify Plus and need the banner on checkout too, add the same snippet in your checkout customization, or ask your developer to place it there.


Verify it works

  1. Open your store in a normal browser tab (visit your homepage or any product page).
  2. If you have visited before, open a private or incognito window so the banner is not already dismissed. Reload the page.
  3. Look for the TermsBox consent banner to appear. It usually shows near the bottom or as a small popup.
  4. Go back to your TermsBox dashboard, open Consent Banner > Install, and click the Verify Installation button.
  5. When the check passes, the status changes to verified. If it does not pass the first time, wait a few seconds and try again, then see Troubleshooting below.

How the verify button works: TermsBox visits your store's main URL and looks for the script tag in the page HTML. It checks the homepage you registered, so make sure the snippet is saved in the live theme and that your store is publicly reachable.


Troubleshooting

The banner does not appear.

  • Make sure you edited the theme that is actually live (published), not a draft or backup theme. In Online Store > Themes, the live theme is at the top under "Current theme".
  • Confirm the snippet is on the line just above </head> in theme.liquid, and that you clicked Save.
  • Check that you copied the whole snippet, including the closing </script>.
  • Reload in a private window in case your browser cached an older page.

The banner shows, but "Verify Installation" still fails.

  • The verifier checks your main store URL. If your store is password protected (for example, still in "coming soon" mode), the check can fail even though the theme is correct. Remove the storefront password, then try again.
  • Some security or bot protection services may block the verifier. If your banner clearly appears for real visitors, your install is fine even if the button struggles.
  • Wait a few seconds between attempts. The verify button is limited to a few tries per minute.

The banner appears but seems empty or does not remember choices.

  • This usually means the site id is missing or wrong. Re-copy the snippet from the dashboard so data-site-id has your real key, and paste it again. Do not type the key by hand.

The banner does not show on checkout.

  • This is expected on standard Shopify plans. Checkout pages cannot run custom scripts unless you are on Shopify Plus. See "A note about checkout pages" above.

Do not add async or defer.

  • If someone added async or defer to the tag, remove it. The tag must load normally and early in the <head>. Use the exact snippet from the dashboard.

Quick reference

  • Snippet source: your TermsBox dashboard, Consent Banner > Install tab.
  • Placement: Online Store > Themes > Edit code > Layout > theme.liquid, on the line just above </head>, loaded normally (no async, no defer).
  • Verify: Verify Installation button on the same Install tab.
  • Checkout pages: covered only on Shopify Plus.
View install guides for all platforms
TermsBox

Scan your website, auto-generate legal documents, add a consent banner, and stay compliant. One platform for everything.

Product

  • Cookie Scanner
  • Consent Banner
  • Cookie Policy Generator
  • Pricing

Generators

  • Privacy Policy Generator
  • Terms and Conditions Generator
  • EULA Generator
  • Disclaimer Generator
  • Return and Refund Policy Generator

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service
  • Cookie Policy
GDPR
ePrivacy
CCPA
LGPD
Google Consent Mode v2
IAB TCF 2.2
© 2026 TermsBox. All rights reserved.