Due to current limitations with Shopify Checkout UI extensions, it’s not possible to add a cookie consent banner directly to the checkout page. However, you can still effectively manage cookie consent to remain GDPR compliant. In this guide, we’ll show you how to display the banner on other pages and use the Shopify Customer Privacy API to apply consent settings to the checkout page as well, ensuring a seamless and compliant user experience.
Please note that we actively monitor Shopify updates for future changes.
Limitations of Shopify Checkout UI Extensions
Shopify recently introduced Checkout UI Extensions to enhance the customization capabilities of the checkout page. These extensions rely on predefined components, meaning only a limited list of Shopify tools can be used for customization. Unfortunately, this list doesn’t support JavaScript or script tags (either inline or remote).
For more details on this limitation, see the Shopify documentation:
Because JavaScript isn’t allowed, we can’t use script tags to display an interactive cookie banner or make custom changes directly to the checkout page. We also can’t manipulate the DOM to display pop-ups or other interactive cookie consent content.
Impact on obtaining consent
While this limitation may seem restrictive, keep in mind that users typically visit several other pages on your Shopify site before reaching the checkout page. This gives you numerous opportunities to collect cookie consent on other pages with your banner. Because these consents are captured and tracked on the pages, users don’t need to see the banner again on the checkout page.
Use of the Shopify Customer Privacy API
While we can’t execute custom JavaScript on the checkout page, we can still effectively manage user consent settings with the Shopify Customer Privacy API. This API provides a method for retrieving the consent status users have provided on previous pages, allowing you to comply with GDPR requirements.
How to use the Shopify Customer Privacy API
Currently, the best approach for setting up a GDPR-compliant Shopify store is as follows:
- Read the Customer Privacy API documentation.
The Shopify API documentation provides detailed steps for accessing and using the Customer Privacy API. You can find the documentation here: Shopify Customer Privacy API . - Retrieve consent status with the API
After a user interacts with the cookie banner on another page of your website, you can use this API to retrieve the consent status. This lets your backend system know what the user’s preferences are, even if they don’t see a banner on the checkout page. - Sync with your cookie banner.
Your cookie banner should automatically update consent values whenever a selection is made. By syncing these values with the Shopify Customer Privacy API, you ensure that consent settings are honored across all parts of the user journey, including the checkout page.
This way, you remain GDPR compliant without having to place a banner on the checkout page itself.
While Shopify currently restricts the placement of cookie banners on the checkout page, you can display the banner on other pages and leverage the Customer Privacy API to remain GDPR compliant. This solution will keep your store user-friendly and compliant until Shopify offers more customization options.
‼️ Important note about the warning in the “Google & YouTube” app
If you recently added – or have already implemented – a cookie banner to your Shopify store using the Complianz for Shopify App, you may see a red warning in the Google & YouTube app stating that no cookie banner is active. Don’t worry, this warning is a false alarm. The warning is triggered because the app is designed to recognize the native Shopify cookie banner. It doesn’t recognize third-party solutions like the Complianz for Shopify banner. However, this does not mean that your cookie banner is not working properly. Your Complianz for Shopify banner is fully functional and complies with the Cookie Policy. This warning does not affect your use of Google services, such as conversion tracking or personalized ads. You can safely ignore this warning. Here’s an example of what the warning might look like.