Skip to main content
WooCommerce → TikTokIntegration guide

Connecting WooCommerce to TikTok Events API

WooCommerce keeps the order in your own database, which is both the advantage and the reason nobody has wired it properly. TikTok's audience skews to exactly the browsers and app contexts where browser-side tracking performs worst. The join between them succeeds or fails on one thing: whether the ttclid reaches the WooCommerce order before the conversion happens, because TikTok can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

WooCommerce to TikTok: ttclid in order meta, consent plugins checked

Check whether TikTok's WooCommerce plugin sends Events API events and pairs event_id. Read ttclid with code that runs on every request, such as an uncached endpoint or edge rule, and save it as order meta. Send CompletePayment from woocommerce_payment_complete with the order number as event_id, value and hashed billing email and phone.

TikTok publishes a WooCommerce plugin; check whether your installed version sends Events API events or only the pixel, and whether it pairs event_id between them. Consent plugins classify the TikTok pixel as marketing and block it, and on stores with an opt-in banner many TikTok visitors close the banner without choosing. The server event from your order is what can still reach TikTok, where your consent policy allows it.

Read the ttclid from the landing URL with code that runs on every request, such as an uncached endpoint or an edge rule, because full-page caching skips PHP entirely and an optimization plugin can defer the script that would have read it. Write it to order meta when the order is created. Send CompletePayment from woocommerce_payment_complete with the order number as event_id, value in the order currency, and hashed billing email and phone.

Measure ttclid coverage on TikTok orders only, by comparing orders that carry the meta against TikTok-tagged landing sessions. If coverage drops after a plugin update, check the cache and script-optimization settings first; that is how a WooCommerce setup that worked at launch quietly stops sending TikTok its click IDs.

WooCommerce → TikTok · what breaks

Why this join usually fails — WooCommerce → TikTok

  1. 01

    The ttclid never reaches WooCommerce

    WooCommerce sites are usually the most heavily plugged-in of any platform. Caching plugins serve a static page to the visitor, optimization plugins defer or strip scripts, and consent plugins block them entirely. Any of the three will stop an identifier being captured, and they fail silently.

  2. 02

    Caching and optimization plugins eat the tracking

    The page the customer sees is not the page your code assumed. This is the most common cause of WooCommerce tracking that worked at launch and silently stopped after a plugin update.

  3. 03

    The ttclid is lost in the in-app browser

    TikTok traffic arrives through an in-app webview whose storage behavior is inconsistent. An identifier captured but not immediately persisted server-side often is not there by the time the conversion happens.

  4. 04

    Nothing reconciles afterwards

    TikTok Events Manager shows received events and their match status. As with Meta, arriving is not the test — deduplicated and matched is. Reconcile TikTok's reported conversions against the source system for the same window.

WooCommerce → TikTok · the fix

What working looks like — WooCommerce → TikTok

  • The ttclid on every order

  • Conversions arriving in TikTok

    Events appear in TikTok Events Manager, deduplicated against the pixel, and become usable for optimization.

  • Reconciled against the source

WooCommerce → TikTok · architecture

How WooCommerce and TikTok actually connect

  1. 1

    WooCommerce holds the truth

    You own the database, so the truth is exactly as good as the query you write against it. Pin the status set first — whether processing, completed, or both count as a conversion changes the number by a lot and is the source of most arguments.

  2. 2

    TikTok Events API needs a click to match

    TikTok matches server events using ttclid where available, falling back to hashed contact information. Both should be sent — the fallback is what carries the events where the click ID did not survive.

  3. 3

    The identifier is the bridge

    The ttclid, captured at the visit and carried into the WooCommerce order.

  4. 4

    The event source decides reliability

    Fire server-side from the PHP hook rather than from the thank-you page template. Page caching means the thank-you page cannot be relied on to execute anything, and on many stores it is served from cache to a paying customer.

  5. 5

    Deduplication at the destination

    TikTok deduplicates on event_id, the same pattern as Meta: the pixel and the Events API must send the same event_id for the same conversion. Mismatched IDs mean double counting.

WooCommerce → TikTok · normal or broken

Working vs. broken, side by side — WooCommerce → TikTok

Normal, not a fault

  • The ttclid present on the order

  • Sent from the woocommerce_payment_complete hook

  • Deduplicated correctly

    TikTok deduplicates on event_id, the same pattern as Meta: the pixel and the Events API must send the same event_id for the same conversion. Mismatched IDs mean double counting.

  • Reconciles with the source

Actually broken

  • The ttclid missing on most records

    WooCommerce sites are usually the most heavily plugged-in of any platform. Caching plugins serve a static page to the visitor, optimization plugins defer or strip scripts, and consent plugins block them entirely. Any of the three will stop an identifier being captured, and they fail silently.

  • Sent from the browser

    The page the customer sees is not the page your code assumed. This is the most common cause of WooCommerce tracking that worked at launch and silently stopped after a plugin update.

  • Counted twice, or not at all

    TikTok traffic arrives through an in-app webview whose storage behavior is inconsistent. An identifier captured but not immediately persisted server-side often is not there by the time the conversion happens.

  • Nobody has reconciled it

WooCommerce → TikTok · diagnose

Diagnostic order — WooCommerce → TikTok

  1. 01

    Count orders carrying the ttclid

  2. 02

    Follow one real conversion end to end

  3. 03

    Check order meta on ten recent orders

    Directly in the database or with a meta viewer. Then disable page caching for the checkout path and see whether coverage changes — if it does, caching is your cause.

  4. 04

    Measure ttclid capture rate on TikTok traffic specifically

    Not on all traffic. TikTok's in-app browser is the failure case, so a healthy overall capture rate can hide a poor one on exactly the traffic that matters.

  5. 05

    Read the match rate, not the success message

    TikTok Events Manager shows received events and their match status. As with Meta, arriving is not the test — deduplicated and matched is. Reconcile TikTok's reported conversions against the source system for the same window.

WooCommerce → TikTok · prove

How it gets proven — WooCommerce → TikTok

Source of truth

WooCommerce → Orders (or the wp_wc_order_stats table), for the same window and status set.

  • The ttclid confirmed present on a live order.
  • Deduplication confirmed in Events Manager, and ttclid capture rate measured on TikTok traffic specifically.
  • Order meta confirmed present on orders placed while full page caching was active.

WooCommerce → TikTok · free audit

What we check in the free audit

  • Count orders carrying the ttclid
  • Follow one real conversion end to end
  • Check order meta on ten recent orders
  • Measure ttclid capture rate on TikTok traffic specifically
  • Read the match rate, not the success message

Checked against

WooCommerce → Orders (or the wp_wc_order_stats table), for the same window and status set.

Get my free conversion tracking audit

Free30 minutesNo obligation

WooCommerce → TikTok · when not to buy

When you don't need this — WooCommerce → TikTok

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the ttclid.
  • If you run a small store with no caching layer and a single free plugin already reporting accurately, leave it alone.
  • If TikTok is a small share of spend, the effort is hard to justify. It pays when TikTok is a channel you are actively scaling.

WooCommerce → TikTok · what we deliver

What gets built — WooCommerce → TikTok

  • Identifier capture into WooCommerce

    Capture the click identifier and persist it as order meta on the order object with a small snippet in the theme's functions or a purpose-built plugin. Order meta lives in your own database, so it survives caching, plugin conflicts and the customer's browser.

  • Event source: the woocommerce_payment_complete hook

    Fire server-side from the PHP hook rather than from the thank-you page template. Page caching means the thank-you page cannot be relied on to execute anything, and on many stores it is served from cache to a paying customer.

  • Dispatch to TikTok

    Server events to the TikTok Events API with the ttclid, hashed contact information and a matching event_id.

  • Reversals where they exist

    The refund hooks carry the order ID, so reversals are straightforward once the identifier is on the order.

Written guarantee

95%+ tracking accuracy

Measured against WooCommerce → Orders (or the wp_wc_order_stats table), for the same window and status set.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

WooCommerce → TikTok questions, answered

Check your installed version's settings for Events API support. If it only sends the pixel, add server events from the payment-complete hook with a matching event_id.

Free · 30 min

Get WooCommerce and TikTok joined properly

Free30 minutesNo obligation