Skip to main content

Testing Facebook Pixel and CAPI Events Using Facebook Events Manager

Introduction​

Testing your Facebook Pixel and Conversion API (CAPI) events using the Test Events tool in Events Manager is an effective way to validate that your PrestaShop store is sending both browser and server-side (CAPI) events correctly.

This method is particularly useful for testing complex events that might not always appear in Pixel Helper, such as:

  • Initiate Checkout
  • Add Payment Info
  • Purchase Event Tracking Delays

This guide will walk you through the step-by-step process to enable test mode and analyze events in Meta's Test Events tool.


Step 1: Get the Test Event Code from Events Manager​

To start testing, you first need to retrieve the Test Event Code from Facebook’s Events Manager.

πŸ“Œ How to Get the Test Code​

  1. Go to Meta Business Suite: Log in to Meta Business Manager.
  2. Open Events Manager: Navigate to Events Manager.
  3. Select Your Pixel: Choose the Pixel ID used in your PrestaShop store.
  4. Go to the "Test Events" Tab: Click on the Test Events section.
  5. Copy the Test Event Code:
    • You’ll see a unique test code, usually formatted as TESTXXXXXXXXXX (where XXXXXXXXXX is a random number).
    • Click Copy.

πŸ“Œ Note: This code is temporary and only works while the Test Events tool is open.


Step 2: Enable Test Mode in the Pixel Plus Module​

Now that you have the Test Event Code, you need to enter it in the Pixel Plus module for PrestaShop.

πŸ“Œ How to Enable Test Mode in the Module​

  1. Go to PrestaShop Back Office.
  2. Navigate to Modules > Pixel Plus > Conversion API (CAPI) Settings.
  3. Find the Test Events Field:
    • Scroll down to find a setting labeled "Test Events Code" (or similar).
    • Paste the Test Event Code you copied from Events Manager.
  4. Restrict Testing to Your IP:
    • Locate the "Limit Logging to Specific IPs" box.
    • Click "Add My IP" to automatically add your current IP address.
    • This ensures only your actions are logged, avoiding unnecessary data.
  5. Enable Test Mode in the Module:
    • Below the IP box, find the option that allows enabling test mode.
    • Set it to "Yes" to activate test event logging.
  6. Click Save to apply changes.

πŸ” Why Restrict Testing to Your IP?

  • Prevents event logs from being flooded by real customer actions.
  • Ensures that only your actions are recorded for analysis.

Step 3: Trigger Test Events from Your Store​

Now that Test Mode is enabled, it's time to simulate customer actions on your PrestaShop store.

πŸ“Œ How to Open Your Store in Test Mode​

  1. Go back to Events Manager in Meta Business Suite.
  2. Look for the Test Events URL:
    • Meta will suggest your shop’s domain (e.g., https://yourstore.com).
    • Click on your store’s URL.
  3. A New Tab Will Open: This tab is now linked to the Test Events tool.
  4. Perform Actions on Your Store:
    • View a product.
    • Add a product to the cart.
    • Start the checkout process.
    • Simulate a purchase.

Step 4: Analyze the Events in Events Manager​

Once you've performed actions on your PrestaShop store, return to Events Manager to analyze the incoming data.

πŸ“Œ How Events Appear in the Test Tool​

  • Browser Events (Pixel-based) β†’ Appear almost instantly.
  • Server Events (CAPI-based) β†’ Take a few seconds to a minute to appear.

Identifying Deduplicated Events​

Facebook automatically groups matching browser and server events together. You can easily identify:

  • Browser Event (sent via Pixel).
  • Server Event (sent via CAPI).
  • Event ID (used for deduplication).

Checking Additional Data​

Click on an event to expand details. You'll see:

  • Event ID β†’ Ensures browser & server versions are correctly linked.
  • User Data β†’ Hashed details sent for better tracking.
  • Custom Parameters β†’ Example: product ID, price, category.

Step 5: Confirm the Events Are Sent by Pixel Plus​

When checking any event (browser or server), Pixel Plus always includes a specific parameter:

"event_trigger": "Pixel Plus"

βœ… If you see the field event_trigger: "Pixel Plus" in the event details, it confirms the event was triggered by the Pixel Plus module.

If this field is missing, it’s possible that:

  • Another module
  • Manual JavaScript code (e.g., fbq() calls)
  • Tag managers like GTM

are sending events independently.

This check is critical for avoiding duplicate tracking and ensuring clean data.

It also helps identifying potenttially duplicated events or events sent from outer sources which can cause issues with the tracking. Check our guide Detecting External Sources Sending Events for more information.


Step 6: Some Events Are Only Visible in Test Events Tool​

Certain events β€” like "Initiate Checkout" and "Add Payment Info" β€” may not always appear in Meta Pixel Helper.

This happens because:

  • They are triggered server-side (via CAPI).
  • Some browsers or privacy settings block client-side tracking.

βœ… However, these events will appear correctly in the Test Events tool inside Facebook Events Manager.

πŸ” Important: If you don’t see an event in Pixel Helper, always check the Test Events tool before assuming something is wrong.

Step 7: What to Do If No Server Events Appear​

If, after performing actions on your store, you don't see any server-side events appearing in the Test Events tool, follow these steps to troubleshoot:

πŸ“‹ Checklist to Review​

  1. Check your Pixel Plus configuration:

    • Ensure the Test Code is correctly pasted into the "Test Events Code" field.
    • Confirm that "Enable Test Code Events" is set to Yes.
  2. Make sure you saved the configuration:

    • After pasting the code and enabling the option, always click Save to apply changes.
  3. Verify IP Restriction Settings:

    • If you added your IP under "Limit Testing by IP", confirm it is correctly detected.
    • This restriction helps avoid mixing your tests with customer traffic.
  4. Consider Server vs User IP Differences:

    • In some setups (e.g., reverse proxies, load balancers, Cloudflare), the IP address Facebook sees might not match your real IP.
    • If you suspect this is the case:
      • Temporarily disable IP restriction.
      • Perform your test quickly.
      • Be aware that without restriction, additional external events might appear in the log.

🚨 Important:
Only disable IP restriction temporarily during testing. Re-enable it after to maintain clean testing data.


πŸ“ˆ Why Server Events Might Be Missing​

If server events are missing, it usually means:

  • The Test Mode was not fully activated.
  • The Test Code was missing or not saved properly.
  • IP restriction was preventing the event from being logged.

After correcting the settings, repeat your store actions (e.g., viewing a product, adding to cart, starting checkout) and check again in the Test Events tool.

Conclusion​

By following this guide, you can test and debug Facebook Pixel and CAPI events in PrestaShop using Events Manager’s Test Events Tool.

🎯 What You Achieved:​

βœ” Retrieved the Test Event Code from Facebook
βœ” Enabled Test Mode in the Pixel Plus module
βœ” Opened your PrestaShop store in test mode
βœ” Verified events in Facebook’s Test Events tool
βœ” Confirmed that events are correctly attributed to Pixel Plus
βœ” Compared browser & server events for deduplication
βœ” Identified hard-to-track events beyond Pixel Helper detection

πŸš€ Final Tip:
Remember to disable the test code option after completing your testing to avoid false positives or misleading Facebook alerts.