Facebook Conversions API and Facebook Meta Pixel
by Dot BD Solutions Limited https://www.dotbdsolutions.com$ 29.99
| 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) |
| Lines of code | 1393 |
| Technical Name |
dotbd_meta_pixel_capi |
| License | OPL-1 |
| Website | https://www.dotbdsolutions.com |
| Versions | 18.0 19.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) |
| Lines of code | 1393 |
| Technical Name |
dotbd_meta_pixel_capi |
| License | OPL-1 |
| Website | https://www.dotbdsolutions.com |
| Versions | 18.0 19.0 |
Meta Pixel + Conversions API for Odoo
The complete Meta/Facebook tracking integration for Odoo 18 & 19. Combines browser-side Meta Pixel and server-side Conversions API (CAPI) with automatic event deduplication — plus a full Facebook Lead Ads → Odoo CRM webhook integration. Works through ad blockers & iOS ITP via server-side CAPI fallback.
Meta Pixel (Browser) • Conversions API (Server) • Auto-Deduplication • Facebook Lead Ads → CRM • SHA-256 PII Hashing
Server + Browser — Perfectly Deduplicated
Facebook received both the browser Pixel event and the CAPI server event with the same Event ID — and automatically marked the browser copy as "Deduplicated". Zero double counting. Exactly as designed.
Works Through Ad Blockers via Server-Side CAPI
Even when a visitor's browser blocks the pixel — your CAPI server events always get through. Never miss a conversion.
Why you only see Server events in the Test Events tab when testing:
If your test browser has an adblocker, the browser pixel is blocked — only CAPI events appear.
Disable your adblocker (or use incognito without extensions) to see both.
Real visitors without adblockers send both Browser + Server events with deduplication.
Browser + Server Events Both Firing & Deduplicated
Meta Events Manager Test Events tab — edu.myskillvora.com (Odoo 19 live deployment). Same Event ID shared between Browser and Server = Facebook deduplicates automatically.
PageView + ViewContent from browser pixel
Same events via CAPI — same Event ID
Matching IDs = no double counting
Tip: If you only see Server events — your test browser has an adblocker. Disable it or use incognito. CAPI still captures 100% of real visitors either way.
All 7 Events Active in Meta Events Manager
Real data from edu.myskillvora.com — PageView, ViewContent, InitiateCheckout, Purchase, AddToCart, CompleteRegistration and Lead all active.
Advanced Matching & Event Match Quality
"Sent via Meta Pixel and Conversions API" — InitiateCheckout confirmed dual-tracked. Advanced Matching sends hashed customer email for better audience targeting.
InitiateCheckout — Sent via Meta Pixel (browser) AND Conversions API (server). 42% of events include hashed email via Advanced Matching for better retargeting.
Events Tracked
Every key ecommerce action, tracked on both browser and server.
PageView
Fired on every page load via the Pixel init script. CAPI fires server-side in the same request — guaranteed coverage even with adblockers.
Browser CAPI DedupViewContent
Fired on every website page — homepage, blog, events, slides, and all CMS pages — as well as product detail pages.
Browser CAPI DedupAddToCart
Fired when a product is added to the cart. Sends content_ids, contents[], value and currency.
Browser CAPIInitiateCheckout
Fired when a visitor reaches /shop/checkout.
Confirmed "Sent via Meta Pixel AND Conversions API" in production.
Purchase
Fired on the confirmation page (browser) and from the payment
transaction model (server). Both share the same
event_id for deduplication.
CompleteRegistration
Fired on signup — browser Pixel fires on form submit, server CAPI fires after the account is created with full hashed PII.
Browser CAPILead
Fired via CAPI when a Facebook Lead Ad form is submitted and the lead lands in Odoo CRM — closes the attribution loop for lead generation campaigns.
CAPI CRMFacebook Lead Ads → Odoo CRM
Leads captured in Facebook go directly into your Odoo CRM pipeline.
Automatic Lead Capture
- Webhook receives the lead the moment a form is submitted
- Fetches full form data from Facebook Graph API v21.0
- Creates crm.lead with all mapped fields
- Sets UTM source, medium and campaign automatically
- Assigns to your default sales team and salesperson
- Stores Facebook Lead ID, Ad ID and Form ID for traceability
- Fires a CAPI Lead event for ad optimisation
- HMAC signature verification prevents spoofed leads
- Idempotent — re-delivered webhooks never create duplicates
Module Features
Everything you need for complete Meta / Facebook integration in one module.
Browser Pixel Tracking
Injects the Meta Pixel base code on every page and fires PageView, ViewContent, AddToCart, InitiateCheckout and Purchase events automatically from your Odoo storefront.
Server-Side Conversions API
Sends the same events from your Odoo backend directly to Facebook via the Conversions API (CAPI). Bypasses ad blockers and iOS restrictions for higher match quality.
Event Deduplication
Browser pixel and CAPI share the same event_id.
Facebook automatically removes duplicates within the 48-hour window —
no double-counting in your Ads Manager.
Facebook Lead Ads → Odoo CRM
Webhook listener automatically creates crm.lead records whenever someone submits a Facebook Lead Ad form — no manual export or CSV import needed.
UTM Attribution
Every lead from Facebook is automatically tagged with utm_source = Facebook, utm_medium = Facebook and the campaign name from the Lead Ad.
Privacy & Security
All customer PII is SHA-256 hashed before transmission. Lead Ad webhooks are verified via X-Hub-Signature-256 HMAC using your App Secret to prevent spoofed requests.
How to Use
Two independent features — configure each separately.
A Meta Pixel + Conversions API
Install & open Settings
Install dotbd_meta_pixel_capi. Navigate to Website → Configuration → Settings.
Enable and enter Pixel ID
Toggle Meta Pixel + Conversions API on. Paste your Pixel ID from Meta Events Manager.
Add Access Token
Paste your System User Access Token from Events Manager → Settings → Conversions API → Generate Token.
Verify with Test Code
Enter the Test Event Code from Events Manager and browse your shop. Check the Test Events tab for CAPI events and the Activity tab for browser events.
Global configuration for all websites. Per-website override available via Configuration → Websites (see below).
Note: The Test Events tab shows only CAPI (server-side) events filtered by your Test Event Code. Browser Pixel events appear in the Activity tab (not Test Events). If you have an adblocker enabled, browser events will be blocked — disable it when testing, or use incognito mode without extensions.
Multi-website support: Set a different Pixel ID per website. If both fields (Pixel ID + CAPI Token) are filled here, the website-specific config takes priority over global Settings. Supports unlimited websites.
B Facebook Lead Ads → CRM
Create a Facebook App
Go to developers.facebook.com → My Apps → Create App. Add the Webhooks product. Also generate a long-lived Page Access Token from App → Tools → Access Token Tool.
Configure in Odoo
Go to CRM → Configuration → Settings → Facebook Lead Ads. Enable it. Enter Verify Token, Page Access Token and optionally the App Secret.
Subscribe the Webhook
Facebook App → Webhooks → Page → Edit.
Callback URL: https://yourdomain.com/facebook/leads/webhook
Subscribe to the leadgen field.
Test a Lead
Use Ads Manager → Lead Ads Forms → Preview to submit a test lead. Open Odoo CRM and confirm the new lead record appears with all fields populated.
Settings Reference
| Setting | Where to find it | Required? |
|---|---|---|
| Pixel ID | Meta Events Manager → Data Sources → your Pixel | Required |
| Conversions API Access Token | Events Manager → Settings → Conversions API → Generate Token | For CAPI (recommended) |
| Test Event Code | Events Manager → Test Events tab | Optional (testing only) |
| Webhook Verify Token | Any string you choose — enter the same in Facebook App → Webhooks | Required for Lead Ads |
| Page Access Token | Facebook App → Tools → Access Token Tool → Page token | Required for Lead Ads |
| App Secret | Facebook App → Settings → Basic → App Secret | Recommended (security) |
| Default Sales Team / Salesperson | CRM → Settings → Facebook Lead Ads section | Optional |
Compatibility
Built for Odoo 18.0 and Odoo 19.0 Community and Enterprise.
Depends on website_sale, payment, crm, utm, auth_signup.
Uses the standard Python requests library (pre-installed with Odoo).
No third-party packages required.
Odoo 18.0 Community Odoo 18.0 Enterprise Odoo 19.0 Community Odoo 19.0 Enterprise Graph API v21.0
Support & Contact
Need help? We respond within 24 hours.
Dot BD Solutions Limited
Copyright © 2026 Dot BD Solutions Limited. All rights reserved.
Author: Rafiur Rahman Rafit
Licensed under OPL-1
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