HomeToolsAdd a Cookie Consent Banner to Shopify

    Add a Cookie Consent Banner to Shopify

    Shopify's built-in Customer Privacy banner is basic. Here's how to install a full consent banner — category opt-ins, Google Consent Mode v2, script blocking, and consent records — with one script tag.

    One Script Tag
    GDPR & ePrivacy
    Consent Mode v2
    Shopify Specific
    4.9 out of 5on Trustpilot
    50,000+
    businesses protected
    www.yourwebsite.com
    Add a Cookie Consent Banner to Shopify
    What information do we collect?
    ✓ GDPR Compliant
    Auto-Updates
    Policy updates automatically
    2-Min Setup
    Generate in minutes

    The Shopify Install, Step by Step

    1

    Scan Your Site (Optional, Free)

    Run the free cookie scanner on your site — no account needed. When you build your banner, the cookie categories are pre-selected from what the scan actually found.

    2

    Create Your Banner in PolicyForge

    In the dashboard, open Consent Banner, pick your position, theme, and colors, enable Google Consent Mode v2 if you use Google tags, and save. You'll get a one-line embed snippet with your banner ID.

    3

    Paste the Snippet into theme.liquid

    In Shopify admin, go to Online Store → Themes → ⋯ → Edit code, open layout/theme.liquid, and paste the snippet just before </body>. Save — the banner is live on every page of your store.

    4

    Align Google Tags and Verify

    If you run Google Ads or GA4, turn on Consent Mode v2 in your banner settings. Then open your storefront in a private window: the banner should appear, and your consent log in PolicyForge should record your choice.

    The Entire Install Is One Line

    <script src="https://policyforge.co/consent.min.js" data-policyforge-consent="YOUR-BANNER-ID"></script>

    Paste it into layout/theme.liquid, just before the closing </body> tag.

    Blocking Trackers Until Consent on Shopify

    Scripts you add yourself in theme.liquid can be gated by changing them to type="text/plain" with a data-consent-category attribute — the banner enables them after consent. Scripts injected by Shopify apps can't be re-tagged this way; for Google tags use Consent Mode v2, and enable Shopify's own Customer Privacy settings (Settings → Customer privacy) so app pixels integrated with Shopify also defer until consent.

    The Banner Needs a Cookie Policy Behind It

    GDPR expects the banner to link to a policy that discloses every cookie your Shopify site sets. Generate one tailored to Shopify — default cookies and common integrations included.

    Shopify Consent Banner FAQs

    What Shopify site owners ask before installing.

    Consent Sorted on Shopify in Minutes

    Banner, policies, scanner, and consent records — one plan, unlimited sites.

    Included in Pro ($15/month) • Free cookie scanner, no account needed