Shopify Customer Privacy API
The Shopify Customer Privacy API lets CookieHub share your visitors’ consent choices with Shopify, so your store complies with privacy regulations without additional configuration.
CookieHub fully supports the Shopify Customer Privacy API as of version 2.8.12. It can be enabled under Integrations in the Settings tab of your CookieHub dashboard, and it is enabled by default for new domains. If you installed CookieHub with the CookieHub Shopify app, it is already set up.
How it works
The integration uses Shopify’s Customer Privacy API to apply consent choices across your store. When a visitor interacts with the CookieHub consent banner:
- Visitor preferences are passed to Shopify through the Customer Privacy API.
- Shopify, its Web Pixels and compatible third-party apps respect consent before they run.
- No extra code or setup is needed on your part.
Set up
- Install CookieHub on your store, preferably with the CookieHub Shopify app.
- Make sure Shopify Customer Privacy API is enabled under Integrations in your domain’s Settings tab. If you change it, click Save & publish.
On domains that were upgraded from an older CookieHub version, check that the integration is enabled.
Parameter mapping
| CookieHub Category | Shopify Consent Field |
|---|---|
| Marketing | marketing |
| Analytics | analytics |
| Preferences | preferences |
| Necessary | Always allowed |
Shopify’s sale_of_data field follows the visitor’s opt-out of the sale of their data in regions using CCPA, and the Marketing category everywhere else.
Benefits
- Automatic compliance with Shopify’s privacy requirements
- Consent in CookieHub and behavior in Shopify stay in sync
- No additional steps or custom coding required