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.