Articles on: Integrations
This article is also available in:

Use Pandectes Consent Event with Shopify Custom Pixel

Overview


This article shows how to create a custom pixel on your Shopify store that listens to the Pandectes consent event, so you can run your own code (for example Google Tag Manager) only with the visitor's consent.


Turn on Pandectes events


  1. In Shopify Admin, go to Apps > Pandectes GDPR > Integrations.
  2. On the Pandectes events card, click Configure.
  3. Turn on the toggle at the top of the page and click Save.


Pandectes events toggle and event structure


Pandectes now pushes the Pandectes_Consent_Update event into the dataLayer on every page load and on every interaction with the banner. The Configuration box shows the event structure. The event is also available to the Shopify Web Pixels API and to custom pixels in Customer events.


Create custom pixel code


  1. Go to your store Settings > Customer Events section
  2. Click on the Add custom pixel button and give a name such as Cookie Consent Pixel and click Add pixel
  3. In the Customer privacy section select in the Permission section the option Not required to let the pixel always run
  4. In the Code area remove the default content and add the Pixel code provided below:


analytics.subscribe("Pandectes_Consent_Update", event => {
//run your custom code here ex. GTM
});


  1. Save the pixel.
  2. Connect the pixel.


If you need any help with the setup, do not hesitate to drop us a line at [email protected] or via our live chat.

Updated on: 27/10/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!