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β
- Go to Meta Business Suite: Log in to Meta Business Manager.
- Open Events Manager: Navigate to Events Manager.
- Select Your Pixel: Choose the Pixel ID used in your PrestaShop store.
- Go to the "Test Events" Tab: Click on the Test Events section.
- Copy the Test Event Code:
- Youβll see a unique test code, usually formatted as
TESTXXXXXXXXXX
(whereXXXXXXXXXX
is a random number). - Click Copy.
- Youβll see a unique test code, usually formatted as
π 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β
- Go to PrestaShop Back Office.
- Navigate to Modules > Pixel Plus > Conversion API (CAPI) Settings.
- 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.
- 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.
- 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.
- 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β
- Go back to Events Manager in Meta Business Suite.
- Look for the Test Events URL:
- Meta will suggest your shopβs domain (e.g.,
https://yourstore.com
). - Click on your storeβs URL.
- Meta will suggest your shopβs domain (e.g.,
- A New Tab Will Open: This tab is now linked to the Test Events tool.
- 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β
-
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.
-
Make sure you saved the configuration:
- After pasting the code and enabling the option, always click Save to apply changes.
-
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.
-
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.