# Shopify Privacy API Integration — Implementation Notes & Quick Reference (2026)
---
## Purpose
Centralise consent handling on Shopify so every marketing, analytics, and advertising tag respects shopper choice by default. These notes cover the minimum viable setup plus the shortcuts production stores actually use.
## Core API surface
- `window.Shopify.customerPrivacy.setTrackingConsent(prefs, callback)`
- `window.Shopify.customerPrivacy.currentVisitorConsent()`
- `window.Shopify.customerPrivacy.analyticsProcessingAllowed()`
- `window.Shopify.customerPrivacy.marketingAllowed()`
- `window.Shopify.customerPrivacy.preferencesProcessingAllowed()`
- `window.Shopify.customerPrivacy.saleOfDataAllowed()`
## Typical flow
1. Detect visitor region (GDPR, UK GDPR, CCPA, LGPD, etc.)
2. Render banner with the correct default state for that region
3. Capture choice and store via `setTrackingConsent`
4. Gate each third-party tag behind the matching `*Allowed()` check
5. Sync state with Google Consent Mode v2 and Meta CAPI
The [full conceptual overview lives here](https://seers.ai/blogs/shopify-privacy-api-integration-quick-overview/) for anyone who wants the business context before reading the code notes.
## Common pitfalls
- Tags firing before consent evaluation (hard-coded `<script>` in theme)
- Inconsistent defaults across regions
- No persistence across sessions
- No audit trail when regulators request proof
- Silent breakage after Shopify or theme updates
- Meta CAPI events sent without the correct consent flags
## Seers shortcut
For teams who do not want to own this plumbing long-term, [Seers](https://seers.ai/) plugs directly into the Customer Privacy API. Install from the Shopify app store, toggle Privacy API Integration on in the dashboard, and the platform handles region detection, Consent Mode v2 mapping, and tag gating automatically. That removes roughly 80 percent of the code you would otherwise maintain in the theme, and it keeps working across theme upgrades.
Direct install reference: [Seers Shopify app](https://apps.shopify.com/seers-cookie-consent).
## Verification checklist
- Reload store in incognito → banner renders → no non-essential tags fire
- Accept analytics only → GA4 fires, Meta Pixel does not
- Reject all → only essential cookies set
- Check `currentVisitorConsent()` in console matches UI state
- Confirm CAPI events carry the correct consent flags
- Retest after every theme update
## Notes for team handoff
Keep this document in your Shopify playbook. Anyone onboarding to the store should be able to verify consent state from the browser console within five minutes without reading the full spec.