Terrabit Facebook Pixel
by Terrabit https://www.terrabit.ro , Dorin Hongu https://www.terrabit.ro
Odoo
$ 63.16
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
CRM (crm)
• eCommerce (website_sale) • Calendar (calendar) • Contacts (contacts) • Discuss (mail) • Website (website) • Invoicing (account) |
| Community Apps Dependencies | Show |
| Lines of code | 724 |
| Technical Name |
terrabit_facebook_pixel |
| License | OPL-1 |
| Website | https://www.terrabit.ro |
| Versions | 16.0 17.0 18.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
CRM (crm)
• eCommerce (website_sale) • Calendar (calendar) • Contacts (contacts) • Discuss (mail) • Website (website) • Invoicing (account) |
| Community Apps Dependencies | Show |
| Lines of code | 724 |
| Technical Name |
terrabit_facebook_pixel |
| License | OPL-1 |
| Website | https://www.terrabit.ro |
| Versions | 16.0 17.0 18.0 |
Terrabit Facebook Pixel

Meta (Facebook) Pixel & Conversion API (CAPI) Integration for Odoo 18
Integrate Meta Pixel and Meta Conversion API (CAPI) into your Odoo 18 Website to track visitor actions and optimize your ad campaigns with 100% data accuracy. #### Key Features: - **Hybrid Tracking (Pixel + CAPI)**: Combines client-side browser tracking with server-side events for maximum accuracy, bypassing AdBlockers and browser tracking limitations. - **Advanced Matching**: Automatically hashes and sends user data (Email, Phone, External ID) using SHA-256 to increase match rates and improve ad performance. - **Centralized Product Identification**: Uses global settings for **Product Variant ID**, **Product Template ID**, or **Internal Reference (SKU)** to match your Facebook Catalog. - **Standard Events Tracking (100% Coverage)**: - `PageView`: Tracks every page visit. - `ViewContent`: Triggered when a product or category list is viewed. - `AddToCart`: Tracks when products are added to the cart. - `RemoveFromCart`: Tracks when products are removed from the cart. - `Search`: Tracks product searches with the search term. - `InitiateCheckout`: Captured during the checkout process. - `AddPaymentInfo`: Tracks when a payment method is selected. - `Purchase`: Sent via CAPI on order confirmation and via Pixel. - `CompleteRegistration`: Tracks new user registrations. - `Login`: Tracks user login events. - `AddToWishlist`: Tracks when products are added to the wishlist. - **Lead Generation Tracking**: - **Frontend**: Automatically tracks clicks on phone numbers and website form submissions. - **Backend (CAPI)**: Real-time tracking of new leads created via CRM/Contact forms. - **Tracking Base Dependency**: Leverages `terrabit_website_sale_tracking_base` for global deduplication and Odoo 18 route normalization. - **Asynchronous CAPI**: Server-side events are sent in background threads, ensuring zero impact on website performance. #### Configuration: 1. Go to **Website > Configuration > Settings**. 2. Enable **Facebook Pixel** in the Google Analytics section. 3. Enter your **Facebook Pixel ID** and **Conversion API Token**. 4. Manage **Item ID Type** and **Exclude Delivery** under the **SEO** section (Global Tracking Settings). #### Technical Implementation: The module extends the `terrabit_website_sale_tracking_base` event bus for frontend events and extends `sale.order` and `crm.lead` models for server-side events. #### Support: For support and customizations, please contact **Terrabit** at [https://www.terrabit.ro](https://www.terrabit.ro).
Table of contents
Usage
How to Use Facebook (Meta) Pixel & Conversion API (CAPI) Integration
Follow these steps to configure and use the Facebook Pixel and Meta Conversion API (CAPI) integration in your Odoo 18 website. #### 1. Activate Meta Pixel in Settings 1. Go to **Website > Configuration > Settings**. 2. Scroll down to the **Google Analytics** section. 3. Check the **Facebook Pixel** option to enable it. 4. Enter your **Facebook Pixel ID** in the field provided. 5. If you want to use server-side tracking (CAPI), enter your **Facebook Conversion API Token**. This token can be generated from your Meta Events Manager. #### 2. Configure Item Identification Type You can choose which product identifier is sent to Facebook to match your Meta Product Catalog. 1. Under the Facebook Pixel settings, find the **Item ID Type** dropdown. 2. Select one of the following: - **Product Variant ID** (Default): Uses the database ID of the product variant. - **Product Template ID**: Uses the database ID of the product template. - **Internal Reference (SKU)**: Uses the `default_code` field from the product. If a product doesn't have an SKU, the database ID will be used as a fallback. #### 3. Exclude Delivery from Conversion Value If you want to track only the product value and exclude shipping costs from your ad performance reports: 1. Enable the **Exclude Delivery** toggle in the Facebook Pixel settings. 2. When this is active, the system automatically subtracts the shipping cost from the `value` parameter sent to Facebook. #### 4. Automatic Event Tracking Once configured, the module automatically tracks the following events without any additional setup: - **PageView**: Tracks every page visit. - **ViewContent**: Tracks every product or category page visit. - **AddToCart / RemoveFromCart**: Tracks cart interactions in real-time. - **Search**: Captures search terms used on the website. - **InitiateCheckout**: Tracks the start of the checkout process. - **AddPaymentInfo**: Tracks when payment methods are selected. - **Purchase**: - **Browser (Pixel)**: Sent when the customer reaches the thank you page. - **Server (CAPI)**: Sent automatically when the Sale Order is confirmed in Odoo backend. #### 5. Advanced Matching (User Identification) The module automatically hashes (SHA-256) and sends the user's data (Email, Phone) when the user is logged in. This significantly improves the **Event Match Quality (EMQ)** in Meta Events Manager, allowing for better attribution and audience targeting. #### 6. Lead Generation The module tracks leads in multiple ways: - **Button Clicks**: Automatically tracks clicks on phone number links (`tel:`). - **Form Submissions**: Tracks when a website form (like the "Contact Us" page) is submitted. - **CRM Leads**: When a new lead is created in the Odoo CRM, a `Lead` event is sent via CAPI to Facebook. #### 7. Verifying the Installation Use the **Meta Pixel Helper** Chrome extension to verify that events are being sent correctly while navigating your website. For CAPI events, check the **Events Manager** in your Meta Business Suite to see the server-side event arrivals.
Bug Tracker
Bugs are tracked on Terrabit Issues. In case of trouble, please check there if your issue has already been reported.
Do not contact contributors directly about support or help with technical issues.
Credits
Authors
- Terrabit
- Dorin Hongu
Maintainers
Current maintainer:

This module is part of the terrabit-ro/bitshop project on GitHub.
You are welcome to contribute.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module