Cherry Seed

Can I track custom events in Klaviyo from WooCommerce?

klaviyo custom events track api woocommerce hooks server-side tracking custom event properties flow triggers

Quick Answer

Yes — use Klaviyo's Track API with WooCommerce action hooks to send custom events beyond the standard ecommerce set. Hook into any WordPress action using add_action, then fire a server-side POST request to Klaviyo's Track endpoint with the event name, customer email, and custom properties. Common use cases include subscription status changes, product review submissions, membership tier upgrades, quiz completions, and support ticket resolutions. Each custom event becomes available as a flow trigger and segmentation criterion in Klaviyo. Server-side tracking via wp_remote_post ensures these events reach Klaviyo even when the customer's browser blocks JavaScript.

Full Answer

Klaviyo's standard WooCommerce integration covers the core ecommerce events — Placed Order, Started Checkout, Viewed Product, and Added to Cart. Everything beyond that requires custom implementation through the Track API.

The implementation pattern is consistent regardless of the event type. Identify the WordPress or WooCommerce action hook that fires when the event occurs. Write a function that extracts the relevant data — customer email, event properties, timestamps — and sends a POST request to Klaviyo's Track endpoint. Register the function on the hook using add_action.

For example, tracking product reviews requires hooking into comment_post with a check for the comment type. When a customer submits a review, the function extracts their email, the product name and ID, the star rating, and the review text, then sends these as event properties to Klaviyo. The event appears in the customer's Klaviyo timeline within seconds.

Server-side implementation matters here. Using wp_remote_post to call Klaviyo's API means the event fires from the WordPress server, not the customer's browser. This eliminates the risk of ad blockers, consent rejection, or JavaScript errors preventing the event from reaching Klaviyo.

The Track API requires your Klaviyo public key and accepts any event name you define. There is no need to pre-register event names — Klaviyo creates the event type automatically on first receipt. However, consistent naming conventions matter because event names are case-sensitive and cannot be merged after creation. Establish a naming pattern before implementation — snake_case or camelCase, not a mix of both.

Sources

Programmatic Access

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

Cite This Answer

Cherry Tree by Seresa - https://seresa.io/seed/klaviyo-email/klaviyo-woocommerce-integration-klaviyo-custom-events