Terrabit TikTok Pixel
by Terrabit https://www.terrabit.ro , Dorin Hongu https://www.terrabit.ro
Odoo
$ 63.55
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
eCommerce (website_sale)
• Website (website) • Invoicing (account) • Discuss (mail) |
| Community Apps Dependencies | Show |
| Lines of code | 772 |
| Technical Name |
terrabit_tiktok_pixel |
| License | OPL-1 |
| Website | https://www.terrabit.ro |
Terrabit TikTok Pixel

TikTok Pixel & Conversion API (CAPI) Integration for Odoo 18
Integrate TikTok Pixel and TikTok 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 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 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 **TikTok Pixel** in the Google Analytics section. 3. Enter your **TikTok 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 TikTok Pixel & Conversion API (CAPI) Integration
Follow these steps to configure and use the TikTok Pixel and CAPI integration in your Odoo 18 website. #### 1. Activate TikTok Pixel in Settings 1. Go to **Website > Configuration > Settings**. 2. Scroll down to the **Google Analytics** section. 3. Check the **TikTok Pixel** option to enable it. 4. Enter your **TikTok Pixel ID** in the field provided. 5. 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). 1. Under the TikTok 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 TikTok Pixel settings. 2. When this is active, the system automatically subtracts the shipping cost from the `value` parameter sent to TikTok. #### 4. Automatic Event Tracking Once configured, the module automatically tracks the following events without any additional setup: - **Product Views**: Tracks every product or category page visit. - **Add to Cart / Remove from Cart**: Tracks cart interactions in real-time. - **Search**: Captures search terms used on the website. - **Checkout Process**: Tracks 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 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 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-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