Fix guide · Webflow · advanced · about 60 min
TikTok Pixel event_id missing on Webflow
For the finding “TikTok events have no event ID”. Also for: Any website, Shopify, WordPress, Framer.
What this means
Each TikTok Pixel event can carry an event ID (event_id), a unique label for that one action. Your site’s events arrive with an empty event_id. The pixel does not fill in an ID by itself (that is the empty event_id field you see in the Network tab): TikTok asks advertisers to choose a unique ID for each event, and if your code does not pass one, the field stays empty.
Whether this costs you money depends on whether your site also sends events from a server through the TikTok Events API:
- Yes, or you are not sure: TikTok deduplicates a browser event and a server event when they share the pixel code, the event name and the
event_id. When the server event has noevent_ideither, TikTok can only fall back to the_ttpcookie, within 5 minutes and only if your server sends it. Otherwise both copies may count. - No, browser pixel only: there is nothing to deduplicate yet, so this has little effect today. It matters the day you add server events.
Webflow has no built-in TikTok integration and no built-in Events API. On a Webflow site, server events only exist if you or a tool added them: server-side Google Tag Manager, TikTok’s Events API Gateway, a third-party App, or an automation or server of your own that forwards Webflow form submissions or orders to TikTok. If none of these is in place, this issue can wait.
We cannot see server-to-server traffic from a browser, so we cannot tell whether your Events API works; we only check the browser events.
How to confirm it yourself
- Open your published Webflow site in a private (incognito) window, open developer tools (F12), go to Network and filter by
analytics.tiktok.com/api/v2/pixel. - Accept cookies, then trigger your key events (for example submit a test lead).
- In each request’s payload,
eventis the event name andevent_idis the ID."event_id": ""means the event has no ID. - In your custom code or GTM, look at the
ttq.trackcalls: TikTok documents the ID in the third argument, for examplettq.track('Lead', {}, { event_id: 'lead-8f3a2c' }). The general guide shows more examples and what Events Manager reports.
How to fix
TikTok keeps the first copy of an event and discards later copies with the same pixel code, event name and event_id that arrive within 48 hours. The ID must be created once and shared by both sides; two separately generated random IDs never match.
Route 1: Google Tag Manager with server-side GTM. If your pixel runs in GTM, fill De-duplication Configurations > Event ID in TikTok’s TikTok Pixel tag template with a variable that creates a new value per event (for example Stape’s Unique Event ID variable), and pass the same value to your server container’s Events API tag. TikTok says that if you set up GTM through its interactive flow in Events Manager, an event_id variable is configured for you.
Route 2: form leads sent to the Events API from a webhook or automation. Webflow can send each form submission to a webhook or to an App, and the submitted field values are included. Webflow submits forms in the background, without a page reload, so a lead event needs code that runs when the submission succeeds. To share one ID between the pixel and the server event:
-
Add a text input to the form, set its Name to
event_id, and hide it (for example withdisplay: none, as in Webflow’s guide to hidden honeypot fields). Some spam filters discard submissions in which a hidden field is filled in, so send a test submission and check that it arrives. -
In the form’s Settings panel, let the form show its Success message rather than redirect to another page. After a successful submission, Webflow shows the Success message, the form block’s element with the class
w-form-done. -
Add this to Site settings > Custom code > Footer code (or the page’s Before
</body>tag field). It fills the hidden field and sends the browserLeadwith the same ID once the Success message appears:<script> document.querySelectorAll('input[name="event_id"]').forEach(function (field) { var id = 'lead-' + Date.now() + '-' + Math.random().toString(36).slice(2, 10); field.value = id; var block = field.form && field.form.closest('.w-form'); var done = block && block.querySelector('.w-form-done'); if (!done) return; var sent = false; new MutationObserver(function () { if (!sent && getComputedStyle(done).display !== 'none' && window.ttq) { sent = true; ttq.track('Lead', {}, { event_id: id }); } }).observe(done, { attributes: true, attributeFilter: ['style'] }); }); </script> -
In your server code or automation, send a
Leadevent to the Events API withevent_sourceset toweb,event_source_idset to your pixel code, andevent_idset to the submittedevent_idvalue. If your automation tool has no event ID field for TikTok, it cannot be matched with the browser event. -
Remove any other
Leadevent for the same form (a GTM tag, a thank-you page snippet, or an App’s form event), or TikTok receives two browser leads.
Lead is TikTok’s current name for a form submission; the older SubmitForm still works and is converted to Lead by TikTok.
Route 3: a third-party App that runs both sides. Apps in the Webflow Apps marketplace such as Pixelflow and Signal Beam say they send events through both the TikTok Pixel and the Events API and deduplicate the two. That only covers the events they send. If you keep a separate pixel in custom code or GTM, its events still have no ID; remove it (a second pixel also shows up as “Duplicate TikTok events”).
Route 4: TikTok’s Events API Gateway. The gateway sends a copy of the pixel’s events to the Events API from a cloud server you administer, and TikTok says it avoids duplicates by matching IDs such as event_id or _ttp. Self-hosting it needs an AWS account and an installation link generated by a TikTok representative. After setup, use the checks below to confirm.
Whatever the route, keep first-party cookies on in Events Manager (Tools > Events > Data sources > your pixel > Settings), so the _ttp fallback still works for any event that slips through without an ID. Then publish your site.
Common causes
- The pixel was pasted from TikTok’s standard base code and event snippets, which do not include
event_id. - Server events were added later (an automation, server-side GTM or an App) and the browser side was never updated.
- An App sets IDs for its own events, but the browser events come from an older, separate pixel in custom code.
- The browser and the server each generate their own ID, so the two never match.
How to verify the fix
- In the Network tab, every
analytics.tiktok.com/api/v2/pixelrequest for your key events carries a non-emptyevent_id, and it changes between actions. - For one test lead, the server sends the same
event_idand event name. Your automation or server log should show the submittedevent_idvalue. - In Events Manager, the “Server & Browser” figures for that event grow (data is not shown in real time).
- Re-run the check on IsPixelWorking. The issue should be gone.
Questions people ask
Does Webflow send TikTok Events API events by itself?
No. Webflow has no built-in TikTok integration. Server events come from tools you add: an automation or server receiving Webflow webhooks, server-side GTM, TikTok’s Events API Gateway or a third-party App.
Sources
- TikTok API for Business, Event Deduplication (keys
event_source_id,eventandevent_id; keep the first, discard later copies within 48 hours;_ttpfallback within 5 minutes): https://business-api.tiktok.com/portal/docs?id=1771100965992450 - TikTok API for Business, Events API 2.0 setup guide for Web (
event_source,event_source_id,event_id; first-party cookies setting): https://business-api.tiktok.com/portal/docs?id=1771100865818625 - TikTok API for Business, Events API and Pixel setup with Google Tag Manager (interactive setup configures an
event_idvariable): https://business-api.tiktok.com/portal/docs?id=1799004052020225 - TikTok on GitHub, TikTok Pixel GTM template (De-duplication Configurations > Event ID): https://github.com/tiktok/gtm-template-pixel
- TikTok Business Help Center, How to adopt TikTok’s updated standard events (
SubmitFormrenamed toLead, legacy names converted): https://ads.tiktok.com/resources/help/article/how-to-adopt-tiktoks-updated-standard-events?lang=en - TikTok API for Business, Events API Gateway (copy of pixel events sent from an advertiser-administered cloud server): https://business-api.tiktok.com/portal/docs?id=1834543156864002
- TikTok API for Business, Self-host Events API Gateway (AWS account, installation link from a TikTok representative): https://business-api.tiktok.com/portal/docs?id=1835087586303106
- TikTok Business Help Center, About Events API Gateway (deduplication by
event_idor_ttp): https://ads.tiktok.com/resources/help/article/about-events-api-gateway?lang=en - Webflow, TikTok integration (no native TikTok support; forms submit via AJAX, so lead events need code on form success): https://webflow.com/integrations/tiktok
- Webflow Help, How do I add forms in Webflow? (Success message, redirect, webhooks, Apps): https://help.webflow.com/hc/en-us/articles/33961347548563-How-do-I-add-forms-in-Webflow
- Webflow Help, Use the honeypot technique to filter spam form submissions (hidden form fields): https://help.webflow.com/hc/en-us/articles/45025662151827-Use-the-honeypot-technique-to-filter-spam-form-submissions
- Webflow Developers, Form submission webhook (payload includes submitted data): https://developers.webflow.com/data/reference/webhooks/events/form-submission
- Webflow Help, Custom code in head and body tags: https://help.webflow.com/hc/en-us/articles/33961357265299-Custom-code-in-head-and-body-tags
- Webflow, Forminit integration (the form block’s default
.w-form-donesuccess element): https://webflow.com/integrations/forminit - Webflow Apps, Pixelflow Meta & TikTok Pixel (third-party; browser pixel plus Events API, deduplicated): https://webflow.com/apps/detail/pixelflow-fb-conversions-api-multi-pixel
- Webflow Apps, Signal Beam (third-party; TikTok Pixel plus Events API with matching event IDs): https://webflow.com/apps/detail/signal-beam
- Stape, Unique Event ID variable: https://stape.io/helpdesk/documentation/unique-event-id
More TikTok guides
- TikTok Pixel fires before cookie consent on Webflow
- TikTok Pixel not firing after cookie consent on Webflow
- Repeated TikTok event IDs drop real conversions: how to fix
- Duplicate TikTok Pixel events on Webflow
- TikTok click ID (ttclid) lost on Webflow
- TikTok Pixel tracks a button on desktop but not on mobile
- Two TikTok Pixels on one site: when it's fine, how to fix
- TikTok Events API deduplication: match the pixel's event_id
- How to set up the TikTok Events API (with deduplication)