Fixing Sync Issues Caused by the Facebook Pixel Module
Check how to make sure you can sync your data even when using the Facebook Pixel Module in Prestashop
Platforms:
The Facebook Pixel Module inserts a pixel in the top of all files in Prestashop.
However this will often cause the Data Sync to fail, because the pixel interferes with the data that Clerk.io is supposed to receive from Prestashop.
Fixing this issue is quite easy - you simply need to make a small adjustment to pspixel.php which is the file generating the pixel.
Often this is found in one of the following 4 paths:
- /modules/pspixel/pspixel.php
- /modules/alcapixel/alcapixel.php
- /modules/facebookpixel/facebookpixel.php
- /modules/canonicalseo/canonicalseo.php
In the file, around line 196, you need to insert the following line of code inside the public function hookHeader($params):
if (strpos($_SERVER['REQUEST_URI'], '/module/clerk/') !== false) {
return;
}
To support the newer data-sync:
if (Tools::getValue('module') == 'clerk') {
return;
}
In the end, the file should look like this:
This will remove the pixel specifically from the links Clerk.io uses to import data from Prestashop.