Facebook Pixel integration for Opencart
This Opencart extension will integrate the Facebook Pixel in your Opencart webshop(s).
This extension will track the default events with dynamically generated values and parameters:
ViewContent, AddToCart, Purchase, Search, AddToWishlist, InitiateCheckout, CompleteRegistration & AddPaymentInfo.
The Facebook pixel can be used for three main functions:
Facebook Help Center
- Building Custom Audiences from your website for remarketing
- Optimizing ads for conversions
- Tracking conversions and attributing them back to your ads
The Pixel events will be reported to Facebook with parameters 'value', 'currency', 'content_ids' (= product ID), 'content_name' (= product name), 'num_items' (for the Purchase, InitiateCheckout & Search event).
Installing the Facebook Pixel PRO integration
Installation of this extension is very simple. Since it doesn't make use of any vQmod or OCMOD modifications, uploading the files manually to the server is all it takes.
Download and unzip the extension package from the Opencart Marketplace. In the unzipped folder, find the folder that corresponds with the version of Opencart you are currently using for your webshop.
Unzip the .ocmod.zip file and upload the 'admin' & 'catalog' folder in the /upload/ folder to the root of the Opencart installation.
Download and unzip the extension package from the Opencart Marketplace. In the unzipped folder, find the folder that corresponds with the version of Opencart you are currently using for your webshop.
Don't unzip the .ocmod.zip file!
Use the Extension Installer to upload the Facebook Pixel extension to your server.
There is no need to refresh the modification cache, since no OCMOD modifications are required for the extension to function.
After uploading the extension files, navigate to Extensions > Extensions
in the shop administration, and select Analytics
in the dropdown (default).
Click the install button next to the Facebook Marketing module.
In the Extension Analytics list in Opencart version 2.2 & 2.3 there is a bug that doesn't display the list correctly.
After installing the Facebook Pixel PRO extension the list will look like the screenshot below:
You can see and click the uninstall button but then there is no edit button
to start configuring the Facebook Marketing module.
This is a bug in the Opencart core source code, which can be corrected using the analytics_bug_fix.ocmod.xml file included in the OC2.2.0.x and 2.3.0.x folders of the extension release.
Upload the OCMOD file with the Extension Installer or manually upload the file to the /system/ folder and refresh the modification cache by clicking the refresh button on the Extension > Modifications page.
After installing the patch and refreshing the OCMOD cache, the analytics list should look like this:
Now you can start configuring the Facebook Pixel PRO extension.
Facebook Pixel Implementation Guide
If you don't have a Facebook Pixel ID yet, navigate to Facebook Advertiser Help Center - Create a pixel in Business Manager and follow the steps on how to create a new Facebook Pixel
After you have created a Facebook Pixel, navigate to Extensions > Extensions
in the shop administration, and select Analytics
in the dropdown (default).
Click the edit button to start configuring the Facebook Pixel. Insert your Facebook Pixel ID in the Facebook Pixel ID field.
If you have already created a Product Catalog in Facebook Business Manager, you can insert the product Catalog ID in the Product Catalog ID field. (optional step, only required if you want to run Dynamic Product Ad campaigns)
Click the button to save the settings.
Creating a Facebook Product Catalog using the Opencart Google Base product feed
Configuration Options
The Facebook Pixel extension features extra configuration options.
The Facebook pixel has an advanced matching feature that enables you to send your customer data through the pixel to match more website actions with Facebook users. With this additional data, you can report and optimize your ads for more conversions and build larger re-marketing audiences. You can pass the customer identifiers, such as email, phone number that you collect from your website during the checkout, account sign-in, or registration process as parameters in the pixel. Facebook then uses this information to match pixel events with Facebook users when the Facebook cookie is not present on the browser that fires the pixel.
Facebook Developer Docs
You can enable/disable each identifier separately under the Advanced Matching Data tab.
Clicking the identifier switch will automatically save the new status for the identifier (PRO version only).
The default settings on initial installation:
Data Security
Any customer data you pass through the Facebook JavaScript pixel is hashed locally on the browser before it goes to the Facebook servers for matching. This hashing process turns your data into short encrypted messages that are difficult to reverse engineer. Facebook typically deletes all matched and unmatched hashes within 48 hours after the matching process ends.
Facebook Developer Docs
The Values VAT Inclusive setting, when enabled, allows to have pixel values including VAT. By default, this setting is disabled ('Off').
Automatic Configuration
The Facebook pixel will send button click and page metadata (such as data structured according to Opengraph or Schema.org formats) from your website to improve your ads delivery and measurement and automate your pixel setup.
Facebook Developer Docs
To configure the Facebook Pixel extension to not send this additional information, you can disable this feature by enabling the Manual Only Mode switch. By default, this setting is disabled ('Off' = SubscribedButtonClick and Microdata events will be tracked).
The extension allows to individually enable/disable tracking of Pixel Events. By default, all events are enabled.
To disable a Pixel Event, click the button on the right of the event name. If the event is disabled, click the
button to re-activate it.
(Changes are saved instantly)
For the Search, AddPaymentInfo, CompleteRegistration and Pageview event, you can specify a custom value in the respective Value field.
After making changes to the event value(s), click the button to save the settings.
For easy troubleshooting it is recommended to use the Facebook Pixel Helper (for Chrome).
No support is provided for this extension.