Test Mode
Available since v2.0
Limit pixel and Conversion API events to your own IP address so you can configure and test without sending data for real visitors.
Overview
When you're setting up the module on a live store — adding your Pixel ID, configuring the Conversion API, testing event tracking — you don't want your own browsing activity to skew your campaign data or send test events to Meta's production stats.
Test Mode solves this by making the module invisible to all visitors except the IP addresses you specify. Real shoppers browse normally and see no pixel activity. You access the same storefront from your whitelisted IP and see full pixel behavior. Once you're satisfied that everything is working correctly, you disable Test Mode and the pixel becomes active for all visitors.
The module checks the visitor's IP on every page load. If Test Mode is enabled and the visitor's IP is not on the allowed list, the module sets itself inactive for that request — no browser pixel fires, no Conversion API calls are made, and no microdata is injected. Visitors outside the list have no indication anything is different.
Configuration
- Go to Modules > Module Manager > Pixel Plus for Facebook > Configure.
- Scroll to the Test Mode panel.
- Click Add my IP to insert your current IP address automatically.
- Enable Enable Test Mode.
- Click Save.
- Open your storefront — events should fire normally in your browser.
- Verify using the Facebook Pixel Helper browser extension and the Conversion API Test Events tool in Meta Events Manager.
- When testing is complete, disable Enable Test Mode and click Save.
| Field | Default | Description |
|---|---|---|
| Enable Test Mode | Disabled | Master toggle. When on, the module only fires events for visitors whose IP is on the allowed list. |
| Restrict Tests & debug by IP | — | Comma-separated list of allowed IP addresses. Click Add my IP to insert your current IP automatically. |
If Test Mode is enabled but the IP list is empty, no one — including you — sees any pixel or Conversion API activity. The Back Office shows a warning in this state. Add at least one valid IP before enabling, or disable Test Mode entirely.
The Back Office displays your current IP status each time you open the module configuration. If your IP is on the list you see an information notice; if it is not, you see a warning notice. Check this message if events are not firing during testing.
How It Works
On every page load, the module runs an IP check before any other logic. The check uses all available IP sources for your visitor: REMOTE_ADDR, HTTP_CLIENT_IP, HTTP_X_REAL_IP, HTTP_X_FORWARDED_FOR, and — if your server sits behind Cloudflare — HTTP_CF_CONNECTING_IP. If any of the visitor's detected IPs matches any entry in your allowed list, the module activates for that request.
If Test Mode is enabled and no match is found, the module marks itself inactive for the entire page load. This means:
- No Facebook Pixel script is injected into the page.
- No Conversion API event is sent to Meta's servers.
- No Schema.org or OpenGraph microdata is added.
- No AJAX tracking calls are made from the storefront.
The IP comparison is exact — each IP in your comma-separated list is trimmed and compared as a string. There is no wildcard or subnet matching.
What Real Visitors Experience
Visitors outside the allowed list see the store completely normally. There are no errors, no missing page elements, and no indication that the module is running in Test Mode. Their shopping experience is entirely unaffected.
Difference From CAPI Test Events
Test Mode and Meta's Test Events feature are separate controls that work at different levels:
- Test Mode (this feature) is a gate that determines whether the module fires at all. Use it to prevent any pixel or CAPI activity from reaching Meta during your testing.
- CAPI Test Events (configured in the Conversion API panel, field
FCTP_ENABLE_TEST_EVENTS) routes events that do fire to a sandbox dashboard in Meta Events Manager, where you can inspect the full payload in real time.
Use both together for the most controlled testing environment: Test Mode so only your IP triggers events, and CAPI Test Events so you can inspect exactly what data is being sent without it counting in your live campaign stats.
Usage Examples
Example: Setting up the module on a live store You're installing Pixel Plus on a store that already has real visitors. Enable Test Mode before configuring anything. Add your office IP and your home IP. Now you can save configurations and browse the front office freely — none of your activity reaches Meta or affects campaign reporting. When everything looks correct in the Pixel Helper and Meta Events Manager, disable Test Mode.
Example: Developer testing a theme change Your developer is modifying the checkout flow and needs to verify that Purchase events still fire correctly. They enable Test Mode and add their development machine's IP. They run through the entire checkout on the live store. Other shoppers complete orders without any pixel data being withheld — only the developer's testing sessions are isolated. No live campaign data is affected.
Example: Multiple team members testing together
Two people on your team need to test simultaneously from different locations. Enter both IPs as a comma-separated list in Restrict Tests & debug by IP: 203.0.113.10, 198.51.100.22. Both team members see full pixel behavior; all other visitors see nothing.
Important Notes
- Test Mode affects both the browser pixel and the Conversion API simultaneously. There is no way to restrict one without the other through this setting.
- If you access the storefront through a VPN, add the VPN's exit IP — not your local machine's private IP. Private-range IPs (e.g.
192.168.x.x,10.x.x.x) are filtered out and will never match, even if added to the list. - The IP list only accepts public IP addresses. The module validates each entry with PHP's
FILTER_VALIDATE_IPusingFILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE— private and reserved ranges are rejected. - Multiple IPs are entered as a comma-separated list in a single text field.
- Test Mode is per-shop in multi-shop setups. Each shop stores its own
FCTP_TEST_MODEandFCTP_TEST_MODE_IPSvalues. You must configure and disable Test Mode separately for each shop. - Test Mode is separate from the Restrict Tests & debug by IP field in the Conversion API panel (
FCTP_CONVERSION_IP_LOG). That field limits CAPI event logging to specific IPs to avoid performance overhead — it does not affect whether events fire.
Troubleshooting
| Problem | Solution |
|---|---|
| Pixel doesn't fire even though Test Mode is on | Open the module configuration page. The Back Office shows whether your current IP is on the allowed list. If you see a warning saying your IP is "not allowed", click Add my IP and save. |
| Test Mode is on but the IP list shows as invalid | The IP you entered may be in a private or reserved range (e.g. 192.168.x.x). These are rejected. Use your public IP, which Add my IP detects automatically. |
| Real visitors are triggering events during testing | Test Mode is disabled, or your IP list contains a shared public IP such as a NAT gateway used by many users. Verify the toggle is on and that the listed IPs are specific to your test machines. |
| After disabling Test Mode, no events fire | Clear the PrestaShop module cache and your browser cache. Reload the front office. If events still do not appear, verify your Pixel ID and that no GDPR consent block is active. |
| I don't know what my current public IP is | Click Add my IP in the panel. The module reads your IP from the current Back Office request and inserts it automatically. |
| Events not firing on multi-shop and Test Mode is disabled on one shop | Test Mode settings are per-shop. Check the configuration for each shop context individually. |
Frequently Asked Questions
Can I leave Test Mode on permanently for a staging store?
Yes. If you maintain a staging or development copy of the store accessible from the internet, keeping Test Mode enabled with your team's IPs is a clean way to prevent any test data from reaching Meta while the store is still publicly reachable.
What happens to real visitors while Test Mode is active?
They see the store completely normally — no errors, no missing features, no indication that anything is different. They just don't trigger any pixel or Conversion API events. Their shopping experience is entirely unaffected.
Is Test Mode the same as Meta's test events feature?
No, they are complementary. Test Mode is a gate that controls whether the Pixel Plus module activates at all for a given visitor. Meta's Test Events feature (in the Conversion API panel) routes events that do fire to a sandbox dashboard so you can inspect them in detail. Use both together: Test Mode to ensure only your IP triggers events, and CAPI Test Events to inspect the full event payload without affecting live campaign data.
My IP address changes frequently — how do I manage this?
Add multiple IPs (comma-separated) if you work from different locations. If your IP changes daily, you'll need to update the list each time — click Add my IP, which always detects your current public IP. Alternatively, consider using a VPN with a fixed exit IP so you can add one stable IP and not update the list again.
Does Test Mode affect the CAPI logging feature?
No. The CAPI logging feature has its own separate IP restriction field (Restrict Tests & debug by IP in the Conversion API panel). Test Mode is a complete module gate; the logging IP filter only controls which requests produce a log entry, not whether events fire.
Can I add an IP range or subnet instead of individual IPs?
No. The allowed IP list accepts individual IP addresses only, separated by commas. Wildcards and CIDR notation are not supported. Add each IP address you want to allow as a separate entry.
Related Features
- Conversion API (CAPI) — The CAPI Test Events feature (test code field, Meta's test sandbox) is a complementary test layer within the Conversion API panel.
- Pixel ID Configuration — Your Pixel ID must be configured before Test Mode verification is meaningful.