Terrabit TikTok Pixel
by Terrabit https://www.terrabit.ro , Dorin Hongu https://www.terrabit.ro$ 342.78
Terrabit TikTok Pixel
Track Page views, events with TikTok pixel
TikTok Pixel & Conversion API (CAPI) Integration for Odoo 19
Integrate TikTok Pixel and TikTok Conversion API (CAPI) into your Odoo 19 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 MatchingAutomatically hashes and sends user data (Email, Phone, External ID) using SHA-256 to increase match rates and improve ad performance.
- Centralized Product IdentificationUses global settings for Product Variant ID, Product Template ID, or Internal Reference (SKU) to match your TikTok 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.CompletePayment: 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 DependencyLeverages
terrabit_website_sale_tracking_basefor global deduplication and Odoo 19 route normalization. - Asynchronous CAPIServer-side events are sent in background threads, ensuring zero impact on website performance.
Configuration:
- Go to Website > Configuration > Settings.
- Enable TikTok Pixel in the Google Analytics section.
- Enter your TikTok Pixel ID and Conversion API Token.
- 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.
Usage
How to Use TikTok Pixel & Conversion API (CAPI) Integration
Follow these steps to configure and use the TikTok Pixel and CAPI integration in your Odoo 19 website.
1. Activate TikTok Pixel in Settings
- Go to Website > Configuration > Settings.
- Scroll down to the Google Analytics section.
- Check the TikTok Pixel option to enable it.
- Enter your TikTok Pixel ID in the field provided.
- If you want to use server-side tracking (CAPI), enter your TikTok Conversion API Token. This token can be generated from your TikTok Ads Manager.
2. Configure Item Identification Type
You can choose which product identifier is sent to TikTok to match your Product Catalog. This is critical for Video Shopping Ads (VSA).
- Under the TikTok Pixel settings, find the Item ID Type dropdown.
- 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_codefield 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:
- Enable the Exclude Delivery toggle in the TikTok Pixel settings.
- When this is active, the system automatically subtracts the shipping
cost from the
valueparameter sent to TikTok.
4. Automatic Event Tracking
Once configured, the module automatically tracks the following events without any additional setup:
- Product ViewsTracks every product or category page visit.
- Add to Cart / Remove from CartTracks cart interactions in real-time.
- SearchCaptures search terms used on the website.
- Checkout ProcessTracks shipping and payment information steps.
- Purchase (CompletePayment)
- 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 email, phone number, and external ID (database ID) when the user is logged in. This significantly improves the Match Rate of your events in TikTok Ads Manager.
6. Lead Generation
The module tracks leads in two ways:
- Button ClicksAutomatically tracks clicks on phone number links (tel:).
- Form SubmissionsTracks when a website form (like the “Contact Us” page) is submitted.
- CRM LeadsWhen a new lead is created in the Odoo CRM, a
Leadevent is sent via CAPI to TikTok.
7. Verifying the Installation
Use the TikTok 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 TikTok Ads account.
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
This module is part of the terrabit-solutions/bitshop project on GitHub.
You are welcome to contribute.
Need help getting started?
We are an Odoo partner building apps for the Romanian market (SAGA & WinMentor export; Romanian accounting localization in progress). Direct support from the team that built the module.
Contact Terrabit →| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
eCommerce (website_sale)
• Website (website) • Discuss (mail) • Invoicing (account) |
| Community Apps Dependencies | Show |
| Lines of code | 536 |
| Technical Name |
terrabit_tiktok_pixel |
| License | OPL-1 |
| Website | https://www.terrabit.ro |
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