Cherry Seed

Does TikTok Events API work with WooCommerce?

TikTok Events API WooCommerce server-side tracking order hooks conversion tracking CAPI

Quick Answer

Yes. TikTok Events API integrates with WooCommerce by hooking into the woocommerce_order_status_completed action, capturing order data including value, currency, product IDs, and customer identifiers, then sending the event to TikTok's server-side endpoint via an authenticated HTTP POST. The implementation requires a TikTok Pixel ID and Events API access token from TikTok Ads Manager. Dedicated WordPress plugins handle this integration automatically, mapping WooCommerce order fields to TikTok's required event schema. Manual implementation requires PHP code that constructs the API payload from WooCommerce order objects and sends it with SHA256-hashed customer email for matching.

Full Answer

The integration works at the WooCommerce hook level, which means it fires on your server during order processing — completely independent of the customer's browser. This is what makes Events API fundamentally different from the TikTok Pixel: the browser is not involved in event delivery.

WooCommerce provides several action hooks where conversion tracking can fire. The most reliable for purchase tracking is woocommerce_order_status_completed, which fires when an order transitions to the completed status. Some implementations use woocommerce_thankyou for faster reporting, but this hook fires when the thank-you page loads in the browser, making it dependent on the customer actually reaching that page after payment gateway redirects.

The Events API payload for a CompletePayment event requires the Pixel ID, event type, event timestamp, and event properties including value, currency, content_type set to product, and a contents array with product IDs and quantities. For user matching, SHA256-hashed email or phone number enables TikTok to attribute the conversion to ad interactions.

Plugin-based implementation handles the mapping automatically. The plugin reads the WooCommerce order object, extracts product SKUs, prices, quantities, and customer email, constructs the TikTok-compliant JSON payload, and sends the POST request. Manual implementation requires writing this mapping in PHP — functional but fragile when WooCommerce updates change order object structures or when custom checkout flows modify the standard data model.

Sources

Programmatic Access

GET https://seresa.io/wp-json/cherry-tree-by-seresa/v1/seeds/716

Cite This Answer

Cherry Tree by Seresa - https://seresa.io/seed/tiktok-tracking/tiktok-events-api-tiktok-api-woocommerce