TikTok Pixel and TikTok Events API | TikTok Pixel eCommerce Tracking, TikTok Conversion Tracking
by Modvanta https://modvantaapps.tech/odoo-apps/tiktok-pixel/$ 29.91
TikTok Pixel and server-side Events API for your Odoo shop
Track product views, add to cart, checkout and purchases from the browser and from your Odoo server, with one event ID on both sides so TikTok counts each sale once. Nothing is sent before the visitor accepts the Odoo cookies bar.
Written and supported by Modvanta - modvantaapps@gmail.com
What it does
The module puts the TikTok Pixel on your Odoo website and sends the standard TikTok shop events: page view, ViewContent, AddToCart, InitiateCheckout, AddPaymentInfo and Purchase, plus Search, CompleteRegistration, website forms and contact links if you switch them on. Each event carries the product IDs, value and currency.
The same events can also be sent from the Odoo server through the TikTok Events API. Browser and server use the same event ID - for the purchase it is the order number - so TikTok keeps one of them. Server events go out after the transaction through a queue with retries, and every request and answer is kept in an event log.
With the Odoo cookies bar on, the pixel script is not loaded and no server event is sent until the visitor accepts. Email, phone and customer ID for advanced matching are normalised and hashed with SHA-256 inside Odoo.
Who it is for
Shops advertising on TikTok Odoo eCommerce stores running TikTok Ads that need reliable conversion tracking. | Stores with late payments Wire transfer or payments confirmed later: the purchase is reported when the order is confirmed in Odoo. | Privacy-minded merchants Teams who want tracking to wait for consent and to share only hashed identifiers. |
Key features
All screenshots were taken on Odoo 19 with this module installed. Server calls went to a local stand-in for the TikTok Events API with a placeholder pixel ID and token.
Feature 1
Nothing before the visitor answers the cookies bar
With the cookies bar switched on, the pixel script is not downloaded until the visitor accepts. Add ?ttp_debug=1 to any shop URL to open the debug panel: here it says consent not given, script not loaded.
Debug panel shows consent, script state and every event
Server events can also be made to wait for consent
Feature 2
Product views with product ID, price and category
After the visitor accepts, the product page sends ViewContent with the product ID, name, category, price, quantity and currency. The panel shows the event ID that the server copy of the event uses too.
Variant changes send a new ViewContent
Product ID format can match your catalog feed
Feature 3
Add to cart and checkout
Adding to cart sends AddToCart with the added product and value. Opening the checkout sends InitiateCheckout and the Pay button sends AddPaymentInfo, each with the cart contents.
Shop list views and search can be tracked too
Wishlist, sign-up, website forms and phone or email links are optional events
Feature 4
The purchase, counted once - even when paid later
This order was paid by wire transfer and confirmed later in the backend. On the customer's next page view the browser reports Purchase with the order number as event ID, and the server sends the same event through the Events API. Reloading the page sends nothing more.
Count purchases for confirmed orders only, or also for pending payments
New or returning customer sent with the purchase
Feature 5
One configuration per website, several pixels
Enter the pixel ID, an optional label, the Events API access token and a test event code for TikTok's Test Events tool. Choose browser only, purchase from the server too, or every event from the server too.
Every active pixel of the website receives every event
Send a server test event button
Feature 6
Choose the events you track
Switch each shop event on or off: product viewed, shop and category page viewed, search, add to cart, add to wishlist, checkout started, pay button clicked and purchase. Account created, website forms and phone or email links are under Other, with the event names you choose.
Purchase and form event names can be changed
Feature 7
Consent and hashed advanced matching
Wait for the cookies bar, require consent for server events, leave internal users and known bots out, and choose which identifiers are shared. Email, phone and customer ID are hashed with SHA-256 in Odoo before they are sent.
No clear-text personal data leaves the shop
Feature 8
Event log with browser and server events
Browser events (optional log) and server events are listed with date, channel, event, event ID, order, value and state. Here every browser event has its server twin with the same event ID.
Send again button for failed server events
Retention and number of send attempts set on the configuration
Feature 9
The request and the answer of every server event
Open a server event to see the tries, the HTTP status, the response of the API and the exact request that was sent, with the hashed identifiers, user agent, page and order lines.
IP, user agent and payload erased after the delay you set
Feature 10
Tracking details on the sales order
The Other Info tab of the order shows the customer's cookie choice and when the browser and the server reported the purchase.
Useful to answer why a sale was or was not reported
How it works, step by step
| 1 | Install the module It needs eCommerce. The menu Website -> Configuration -> TikTok Pixel appears. |
| 2 | Add your pixel Create the configuration for your website, paste the pixel ID from TikTok Ads Manager and, for server events, the Events API access token. |
| 3 | Pick events and consent rules Choose the events, the server scope, the cookies bar behaviour and the matching identifiers. |
| 4 | Check and go live Open your shop with ?ttp_debug=1, use the test event code with TikTok's Test Events tool, then remove the code. |
Settings
Everything is on the TikTok Pixel configuration of each website.
| Pixels | Pixel ID, label, Events API access token, test event code, active switch. |
| Server-side events | Browser pixel only, purchase from the server too, or every event from the server too. |
| Events | Product, list, search, cart, wishlist, checkout, pay button, purchase, account created, website form, phone or email link. |
| Purchase and Products | Confirmed orders only or also pending payments, late confirmation window, value with or without taxes and delivery, new or returning customer, product ID format and prefix, category. |
| Consent and Matching | Wait for the cookies bar, server events need consent, skip internal users and bots, hashed email, phone and customer ID. |
| Diagnostics | Debug mode, log browser events, log retention, erase personal data after N days, send attempts. |
Frequently asked questions
Will TikTok count a purchase twice when both browser and server send it?
No. Both use the same event ID, the order number for the purchase, which is what TikTok uses to deduplicate. The order also remembers that the browser reported it, so a reload sends nothing more.
Do I need the Events API?
No. Choose Browser pixel only and no access token is needed. Adding the token lets the server send the purchase or every event, which also covers visitors with ad blockers.
What happens with wire transfer or other late payments?
With Confirmed orders only, the purchase is reported when the order is confirmed in Odoo: the server sends it at once and the browser reports it on the customer's next visit within the window you set.
Is anything sent before consent?
Not when Wait for the cookies bar is on: the pixel script is not loaded. Server events can be made to wait for consent too.
Can I use more than one pixel?
Yes. Add several lines on the Pixels tab; every active pixel of the website receives every event.
Compatibility
Odoo 19 Community and Enterprise | eCommerce only dependency | TikTok Events API v1.3 event track | 89 tests run on install |
Track TikTok conversions from your Odoo shop
Questions before you buy, help with setup, or a change for your own workflow - write to us and a developer answers.
SUPPORT | AUTHOR Modvanta | INCLUDED Module, setup help by e-mail |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
eCommerce (website_sale)
• Website (website) • Discuss (mail) • Invoicing (account) |
| Lines of code | 2141 |
| Technical Name |
mdv_tiktok_pixel |
| License | OPL-1 |
| Website | https://modvantaapps.tech/odoo-apps/tiktok-pixel/ |
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