Configuring GDPR Consent Settings in Pixel Plus for PrestaShop
Introduction
The Pixel Plus module for PrestaShop helps you comply with GDPR regulations by blocking Facebook Pixel and Conversion API (CAPI) events until the customer gives explicit consent.
This guide will show you how to:
- Detect where your consent manager saves consent data (Cookies, Local Storage, or PrestaShop internal cookie).
- Configure Pixel Plus to block or allow events accordingly.
- Test and verify that events are blocked and unblocked correctly based on consent.
Step 1: Identify Where Consent Data Is Stored
Consent data is usually stored in:
- Cookies (most common)
- Local Storage (less common)
- PrestaShop’s internal cookie
When inspecting, accept only marketing/ad customization cookies in your consent popup. This ensures you’re checking the cookies relevant to Facebook Pixel usage.
Option A: Check Cookies (Most Common)
- Open your store in Google Chrome.
- Press
F12
or right-click → Inspect to open DevTools. - Go to the Application tab.
- Expand Cookies and select your store's domain.
- Accept only marketing cookies.
- Look for:
- New cookies added after acceptance.
- Changes in existing cookie values.
Common Cookie Examples:
Cookie Name | Example Value |
---|---|
cookieconsent_status | accepted |
cookiebot_consent | {"marketing":"true","statistics":"false"} |
oneplus_consent | {"ads":"true","necessary":"true"} |
Take note of:
- The cookie name, e.g.,
cookiebot_consent
. - The value pair, like
"marketing":"true"
.
Option B: Check Local Storage (If Cookies Show Nothing)
- In DevTools, go to Application → Local Storage.
- Select your store's domain.
- Accept only marketing cookies and look for new entries.
Example:
Key | Value |
---|---|
cookieplusConsent | {"marketing":"true","preferences":"false"} |
Take note of:
- The key name.
- The specific value like
"marketing":"true"
.
Option C: Check PrestaShop’s Internal Cookie (If No Result)
If no relevant cookies or local storage entries appear:
-
In PrestaShop Back Office → Modules → Pixel Plus → GDPR Section, find:
"If you're using a module that generates the cookie and you don't know the cookie name and value you can click here to generate a temporal token to access the cookies on the front."
-
Click "Click here".
-
A new button will appear, click on it to Print the front cookies, unhashed.
-
A clear list of cookies (including internal ones) will display in a table format.
-
Click once in the cookie name that's related to the consent.
-
Now a list of the key > Value pairs will be displayed
-
Click now on the one related to the marketing / ads
Pixel Plus will auto-fill the cookie name and value.
Step 2: Enable GDPR Blocking in Pixel Plus
- In PrestaShop Back Office → Modules → Pixel Plus → GDPR Section, enable:
Block the script: Enabled
This stops Pixel and CAPI events until consent is confirmed.
Step 3: Configure GDPR Block Mode
Choose based on what you found:
Option | Use When |
---|---|
Cookies | Consent is saved in a browser cookie. |
Local Storage | Consent is saved in local storage. |
Internal Cookie | Consent is found in PrestaShop’s internal cookie. |
Step 4: Enter Cookie or Local Storage Details
A) Using Cookies:
-
Add the cookie name to look for which you will have found previously:
Example:cookiebot_consent
,cookieconsent_status
,oneplus_consent
-
Specific Cookie Value (optional):
Example:"marketing":"true"
If multiple values:
marketing:true|||ads:true
-
Is an External Cookie:
Set to External if generated by an external service (e.g., Cookiebot).
Set to PrestaShop if it’s an internal cookie.
B) Using Local Storage:
- Enter the key name, e.g.,
cookieplusConsent
. - Enter the value pair if applicable, e.g.,
"marketing":"true"
. - Set Is an External Cookie = External.
C) Using Internal Cookie:
If you used the Print front cookies tool, Pixel Plus will autofill:
- Cookie name.
- Specific value pair.
Set Is an External Cookie = PrestaShop.
Step 5: Handle Page Reloads After Consent
Scenario | Setting |
---|---|
Page reloads after accepting/denying consent | Enable Page reloads after the consent? |
Page does NOT reload | Configure Selector for the Cookies Button |
Step 6: Configuring the Cookies Button Selector (For No Reload Pages)
- Open Chrome DevTools → Elements tab.
- Use Select Element tool to click on the cookie banner button.
- Check if it’s a
<button>
or<a>
element. - Inspect parent containers for a wrapper.
- Build a selector:
.cookie-banner-wrapper button
- Enter this in Selector for the Cookies Button.
Step 7: Disable Advanced Consent Validation (Optional)
If:
- Consent is configured correctly.
- Events don’t fire after acceptance.
Enable:
Disable advanced consent validation: Enabled
Step 8: Testing GDPR Configuration
- Clear cookies & local storage in your browser.
- Open your store.
- Open Pixel Helper or Facebook Test Events tool.
- Reload the page:
- No events should fire initially.
- Accept only marketing cookies.
- Check that:
- Pixel events (like PageView) start firing.
- CAPI events log correctly if configured.
Conclusion
By following these steps, you have:
- Identified if consent is stored in Cookies, Local Storage, or PrestaShop internal cookies.
- Configured Pixel Plus to block Facebook Pixel and CAPI events based on consent.
- Ensured GDPR compliance while maintaining accurate event tracking.
- Verified correct behavior using Facebook’s debugging tools.
For more information, refer to Facebook’s Consent Guidelines.