Skip to main content

Installing on Shopify

One Privacy works on every Shopify plan. The setup takes a few minutes and only needs a small change to your theme.

Get your script

In One Privacy, open Scripts and copy the Production snippet.

The snippet looks like:

<script data-oneprivacy-widget="true" src="https://.../live/<projectId>/sdk.js"></script>

Add the snippet to your theme

  1. Sign in to your Shopify admin.
  2. Go to Online Store → Themes.
  3. Find your active theme and click Actions → Edit code.
  4. In the file list on the left, open Layout → theme.liquid.
  5. Find the <head> tag near the top of the file.
  6. Paste the One Privacy snippet right after the opening <head> tag.
  7. Click Save.

The banner now loads on every page of your store.

Verify it works

Open your store in a fresh browser session (incognito works well). The banner should appear within a couple of seconds.

Walk through Accept All, Reject All, and Manage Settings. Check that consent records appear in your Consent Audit.

See the full checklist: Verifying the banner is live.

Shopify ships with a basic cookie banner of its own in some regions. If yours is enabled, turn it off so visitors don't see two banners.

Go to Settings → Customer privacy. Switch off the built-in banner. One Privacy will handle consent from there.

Shopify Customer Privacy API

On a Shopify storefront, One Privacy passes every consent choice to Shopify's Customer Privacy API with setTrackingConsent(). This runs each time a visitor accepts, rejects, or saves settings, and never without a visitor action, as Shopify requires. Shopify's own pixels, checkout, and apps that read the Customer Privacy API then follow the same choice as your other tags.

The mapping from One Privacy categories to Shopify consent:

One Privacy categoryShopify consent
Performance cookiesanalytics
Targeting cookiesmarketing and sale_of_data
Functional cookiespreferences

No extra setup is needed. The call only runs when the page is a Shopify storefront.

A note on tracking pixels

If you use Shopify's Facebook Pixel, Google Ads, or other tracking integrations, One Privacy passes the right consent signals automatically through Google Consent Mode v2 and the Shopify Customer Privacy API. See Google Consent Mode.

What's next

Verifying the banner is live.

Google Consent Mode.

Troubleshooting installation.