Skip to main content

Testing Facebook Pixel and CAPI Events in PrestaShop

Introduction

Testing your Facebook Pixel and Conversion API (CAPI) events is crucial to ensure proper event tracking and deduplication in your PrestaShop store. This guide will walk you through two methods:

  1. Using Google Chrome’s Pixel Helper Extension to check browser events.
  2. Using PrestaShop’s Logging Feature inside the CAPI section of the Pixel Plus module to record server-side events.

By following this guide, you can confirm that:

✅ Events are firing correctly in the browser.
✅ Server-side events are being logged and processed.
Deduplication is working as expected.


Step 1: Install the Facebook Pixel Helper Extension

To test browser events, you need to install Meta Pixel Helper, a Google Chrome extension.

Installation Instructions:

  1. Open Google Chrome.
  2. Visit the Meta Pixel Helper extension.
  3. Click "Add to Chrome", then "Add Extension".
  4. Once installed, you’ll see the Pixel Helper icon in the Chrome toolbar.

💡 Tip: If you don’t see the Pixel Helper icon, click on the extensions menu (puzzle icon) and pin it.


Step 3: Enable CAPI Event Logging in PrestaShop

To verify server-side events (CAPI), use the logging feature in the Pixel Plus module.

How to Enable CAPI Logging:

  1. Go to PrestaShop Back Office.
  2. Navigate to Modules > Pixel Plus > Conversion API Settings.
  3. Find the option "Enable Event Logging."
  4. Set it to "Yes".
  5. (Recommended) Restrict Logging to Your IP:
    • Locate the "Limit Logging to Specific IPs" box.
    • Click "Add My IP" to automatically add your IP address.
    • This ensures logs are only saved for your tests, preventing unnecessary data collection.
  6. Save the configuration.

Additional Logging Features:

  • View Logged Events in PrestaShop:
    Once enabled, events will be stored in PrestaShop's log section, helping you analyze what is sent to Facebook.
  • Key Fields to Check:
    • events_received → Indicates how many events Facebook has successfully received.
    • fbtrace → A unique tracking token from Facebook. This confirms Facebook processed the event.

🛑 If these fields are missing from the logs, Facebook is not receiving your events! Double-check your CAPI settings.


Step 3: Start Generating Events

Now that the Pixel Helper extension is installed and the CAPI logging is enabled, follow these steps to test your browser-based Pixel events.

  1. Open your PrestaShop store in Chrome.
  2. Click on the Pixel Helper icon in the toolbar.
  3. The Pixel Helper will display all the Facebook Pixel events fired on the page.
  4. Click on each event to check:
    • Event Name (e.g., PageView, AddToCart, Purchase).
    • Pixel ID (Should match the one configured in Pixel Plus module).
    • Warnings or errors (if any).

📌 Expand Event Details for More Insights

Click the black triangle (▸) next to an event to expand its details. This reveals:

  • Event ID (used for deduplication with CAPI events).
  • User data parameters (e.g., email, phone number, hashed for privacy).
  • Custom parameters (e.g., product ID, price).
  • Diagnostics (warnings about missing or misconfigured parameters).

⚠️ Common Issue: If Pixel Helper shows no events, ensure that:

  • The Facebook Pixel ID is correctly configured.
  • No ad blockers are blocking the script.
  • The Pixel is firing on the page.
  • The module is not being blocked by a consent manager module / system

🛑 Troubleshooting Tip:
If events disappear after a short time, try triggering an event, switching to another tab, and then rechecking the Pixel Helper log.


Step 4: Compare Browser and Server Events for Deduplication

Now that Pixel Helper (browser) and CAPI logs (server) are active, compare the results.

What to Look For:

  • The same event (e.g., Purchase) should appear in both:
    • Pixel Helper (browser)
    • CAPI logs (server)

This will lead to event deduplication which means only the most meaningfull event will be kept by Facebook, for that to happen it's necessary that:

  • The Event ID in Pixel Helper and CAPI logs should match.

How to Check Deduplication:

  1. Open Pixel Helper and expand the event details.
  2. Look for the Event ID.
  3. Open PrestaShop's CAPI logs and find the same event.
  4. Compare the Event ID in both places.
  5. If they match, Facebook will deduplicate the event and optimize based on the most reliable source.

⚠️ Pixel Helper May Hide Events Over Time!
If the event disappears:

  • Trigger the event again (e.g., add a product to cart).
  • Switch to another tab.
  • Return to Pixel Helper to check if the event logs are still available.

Conclusion

By following this guide, you can test and debug your Facebook Pixel and Conversion API events in PrestaShop.

What You Achieved:

✔ Verified that browser events fire using Pixel Helper.
✔ Enabled CAPI event logging and restricted it to your IP.
✔ Compared browser & server events to confirm deduplication.

🚀 Next Step: If you still experience issues, check the Facebook Debugging Tools or review the CAPI & Pixel configurations inside the Pixel Plus module.

For more details, visit the official Facebook Event Debugging Guide.