Skip to main content

Testing Purchase Events and Troubleshooting Issues in PrestaShop

Introduction

Ensuring that Facebook’s Purchase event is correctly tracked in your PrestaShop store is crucial for accurate sales reporting and ad optimization. This guide will walk you through:

Testing the Purchase event using Pixel Helper and PrestaShop's CAPI logging.
Verifying deduplication between browser and server events.
Troubleshooting missing Purchase events for specific payment methods.


Step 1: Install Meta Pixel Helper for Google Chrome

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

📌 How to Install Pixel Helper

  1. Open Google Chrome.
  2. Go to the Meta Pixel Helper Extension.
  3. Click "Add to Chrome", then "Add Extension".
  4. The Pixel Helper icon will appear in your Chrome toolbar.

💡 Tip: If the Pixel Helper icon doesn’t appear, go to the extensions menu (puzzle icon) and pin it.


Step 2: Enable Logging in the Pixel Plus Module

To analyze server-side (CAPI) events, you must enable event logging inside the Pixel Plus module.

📌 How to Enable Logging in PrestaShop

  1. Go to PrestaShop Back Office.
  2. Navigate to Modules > Pixel Plus > Conversion API Settings.
  3. Scroll Down to the Logging Section.
  4. Add Your IP Address:
    • Locate the "Limit Logging to Specific IPs" box.
    • Click "Add My IP" to automatically register your current IP.
  5. Enable Log Events:
    • Activate the setting labeled "Log events in the PrestaShop log."
  6. Save Changes.

Now, both browser (Pixel) and server (CAPI) events will be recorded, allowing you to verify if Facebook is receiving the Purchase event.


Step 3: Test the Purchase Event for Each Payment Method

Since some payment methods may not trigger the Purchase event, testing each method individually ensures full tracking coverage.

📌 How to Test a Payment Method

  1. Create a Test Purchase using one of your payment methods.
  2. Immediately check the Pixel Helper:
    • The Purchase event should appear.
    • Click on the event to expand details.
    • Make sure the parameter event_trigger: 'Pixel Plus'* is present.
    • Verify the event_id (this will help with deduplication checks later).
  3. Open PrestaShop's Log Section:
    • In Back Office, go to Advanced Parameters > Logs / Registers.
    • Look for the Purchase event in the logs.
    • The event_id should match the one from Pixel Helper.

⚠️ Tip: If the event_trigger: Pixel Plus is missing in the event, it means the event hasn't been triggered by the Pixel Plus module.

🛑 Issue: No Purchase Event in Pixel Helper?

  • Ensure that Pixel tracking is enabled in the module.
  • Some payment pages (e.g., redirect-based gateways) may prevent tracking.

Step 4: Check If Facebook Received the Event

Facebook provides confirmation parameters that indicate if the event was received.

📌 Important Fields to Verify in the PrestaShop Logs

  • events_received → Indicates how many events Facebook received.
  • fbtrace → A unique tracking token from Facebook that confirms event processing.

⚠️ If events_received is missing:

  • Multi-cURL might be causing issues.
  • Disable multi-cURL inside the CAPI options (last option in the settings).
  • Save the changes and retry the purchase event.

Step 5: Verify Deduplication

To ensure deduplication is working, check that the same event_id appears in both:

  1. Pixel Helper (browser event).
  2. PrestaShop logs (server event via CAPI).

If the event_id matches, Facebook will deduplicate the event, selecting the most reliable version for tracking.


Step 6: Ensuring No Duplicate Purchases Appear

After reloading the page:

  1. Pixel Helper should no longer show a Purchase event.
  2. No new Purchase events should appear in PrestaShop logs.

If a duplicate Purchase event appears, Facebook might not be deduplicating events properly.

🛑 Fix: Enable Cookies for Deduplication

  • In Pixel Plus module settings, find "Use cookies to prevent duplicates."
  • Enable this option.
  • Save settings and retry the purchase.

Step 7: Troubleshooting Missing Purchase Events

Scenario 1: A Payment Method Doesn't Trigger the Event

If one of your payment methods does not send a Purchase event, adjust the module settings:

  1. Go to Pixel Plus Module > Advanced Parameters.
  2. Locate "Force Basic Mode".
  3. Select the Payment Method that failed to send the event.
  4. Enable the "Use cookies to prevent duplicates" option.
  5. Save the settings.

Scenario 2: Purchase Event Not Appearing in Facebook

If the event is logged in PrestaShop but not received by Facebook:

  1. Verify events_received and fbtrace in logs (Step 4).
  2. Check if multi-cURL is enabled and try disabling it (Step 4).
  3. Repeat the purchase test after saving changes.

Scenario 3: Some Events are Tracked, but Others Are Missing

Some payment gateways redirect users away from your store before returning them. This may cause Pixel-based events to fail.

  • Solution: CAPI should handle these cases, so ensure server-side tracking is enabled.

Conclusion

By following this guide, you can test and troubleshoot the Purchase event for every payment method in your PrestaShop store.

What You Achieved:

✔ Verified Purchase events using Pixel Helper.
✔ Enabled server event logging and verified logs in PrestaShop.
✔ Checked Facebook’s response for events_received and fbtrace.
✔ Ensured deduplication works by matching event_ids.
✔ Fixed missing events for specific payment methods.

🚀 Next Step:
If a payment method still isn’t tracking properly, review its checkout flow and ensure server-side tracking is enabled.

For further debugging, visit Facebook’s Official Debugging Guide.