How To: Configure Consent for Facebook in Shopify

A step-by-step technical guide for managing Facebook pixels in Shopify

In order to manage pixels in Shopify, such as Facebook for advertising, you will need to install the Ethyca Consent Javascript Tag to ensure consent is appropriately configured.

The Ethyca Consent Javascript Tag is a javascript code snippet hosted by Ethyca that will show up in the header of your website as "emp-shopify.js". This will be added to your liquid theme templates to ensure that consent for Facebook is managed appropriately. This will be added directly to your themes as Shopify does not provide a method to correctly set consent through existing API's for Facebook's pixel.


When implementing a use case for processing sensitive personal information, ensure that any third party integrations take the GROUP6 flag into account. If third parties collect sensitive personal information, this information cannot be processed without without explicit opt-in consent from the user.

Configuring Consent for Facebook's Advertising Pixel in Shopify

In order to setup the emp-shopify.js pixel, please navigate to the Themes section of your Shopify storefront admin panel.

From here, select to Customize your current theme as shown in the image below:


Now click on the ellipsis beside Theme Actions and select "Edit Code" from the pop up menu.


From here, you will need to edit the theme.liquid and checkout.liquid template files.


For each template page, locate the opening <head> tag and directly beneath this, paste in the Ethyca Management Pixel:

<!-- Ethyca Management Platform -->  
    <script language="javascript" type="text/javascript" src=""></script>  
<!-- Ethyca Management Platform -->

As shown in the screenshot below, this should be located beneath the <head> to ensure that it's loaded as early in the page sequence as possible to manage other events on the site such as the Facebook pixel.


Save both of your template pages and you're all set.

Testing with Facebook Pixel Helper

In order to test, you'll need to download the Facebook Pixel Helper widget in Chrome to see if the dpo parameter is displayed. If dpo: shows inside your pageview event, then your shopify-emp.js tag is correctly configured.


For a more detailed instruction guide, check out our support article on how to end to end test Facebook Limited Data Use.


Please contact [email protected] if you require any technical assistance or troubleshooting support.