Email MarketingDecember 29, 2025

Custom Events in Klaviyo API: Tracking What Matters Beyond Purchases

Klaviyo's API lets you track custom events that power smarter flows and segments. Here's how to set up custom event tracking for advanced automation.

Mark Cijo

Mark Cijo

Founder, GOSH Digital

Custom Events in Klaviyo API: Tracking What Matters Beyond Purchases

The standard Shopify-Klaviyo integration tracks the basics: Viewed Product, Added to Cart, Started Checkout, Placed Order. These events power your core flows — abandoned cart, browse abandonment, post-purchase.

But your customers do dozens of other things that indicate interest, intent, or engagement that never make it to Klaviyo. They take a quiz on your site. They watch a product video. They use your size guide. They click a "Notify Me" button. They hit a loyalty milestone. They leave a review.

Every one of these actions is a signal. And every signal is a potential trigger for a perfectly timed, perfectly relevant email or SMS. The problem is that Shopify's native integration doesn't track them. You need Klaviyo's API to push custom events.

Here's how to think about custom events, which ones to track, and how to use them for flows that your competitors don't have.

What Custom Events Are

A custom event is any action you define and send to Klaviyo through their API. It gets attached to a customer profile just like a "Placed Order" event, but the event name and data properties are whatever you want.

Standard events (from Shopify integration):

  • Viewed Product
  • Added to Cart
  • Started Checkout
  • Placed Order
  • Fulfilled Order

Custom events (you create these):

  • Completed Quiz
  • Watched Product Video
  • Used Size Guide
  • Signed Up for Back-in-Stock
  • Redeemed Loyalty Points
  • Submitted Review
  • Referred a Friend
  • Downloaded Resource
  • Visited Store Locator

Each custom event can carry properties (metadata). A "Completed Quiz" event might carry properties like quiz_result: "oily skin," recommended_product: "Oil-Free Moisturizer," and score: 85. These properties become available for segmentation and email personalization.

High-Value Custom Events for eCommerce

Here are the custom events we recommend tracking for eCommerce brands, ranked by impact:

1. Quiz Completed. If you have a product recommendation quiz (and you should), track completion as a custom event. Properties: quiz result, recommended products, skin type/preference type, score.

Flow trigger: Send a personalized product recommendation email immediately after quiz completion showing the products matched to their answers. This flow typically converts at 15-25% because the recommendations feel tailored (because they are).

2. Back-in-Stock Signup. When someone clicks "Notify Me" on an out-of-stock product, track it as a custom event with the product ID as a property.

Flow trigger: When inventory is restocked, trigger a "Back in Stock" notification to everyone who signed up. These emails have extremely high conversion rates (30-50%) because the intent was explicitly stated.

3. Review Submitted. Track when a customer leaves a review. Properties: rating, product reviewed, review text length.

Flow trigger: Thank them immediately. If the review is 5 stars, ask for a referral. If it's 3 stars or below, trigger a customer service outreach to resolve the issue before it becomes a public complaint.

4. Loyalty Tier Change. When a customer moves up (or down) a loyalty tier, track it.

Flow trigger: Tier upgrade? Celebration email with new perks explained. Tier downgrade risk? Reminder email showing how close they are to maintaining their status, with an incentive to purchase.

5. Referral Made. Track when a customer refers a friend (not when the friend buys — just the referral action).

Flow trigger: Thank them. Update them when their friend makes a purchase. Remind them of their referral rewards balance.

6. Wishlist Addition. If your store has a wishlist feature, track each addition.

Flow trigger: Periodic "Your wishlist items are selling fast" reminder. Or trigger when a wishlisted item goes on sale or drops in stock.

7. Video Watched. If you have product videos, track when someone watches more than 50% of a video.

Flow trigger: Follow up with related content or a product recommendation based on what they watched. Someone who watches a full product demo video has high purchase intent.

8. Support Ticket Created/Resolved. Track customer service interactions.

Flow logic: Suppress marketing emails while a ticket is open. After resolution, send a satisfaction check-in. After positive resolution, request a review.

Setting Up Custom Events

Custom events are sent to Klaviyo via their Track API endpoint. The implementation requires some development work but isn't complex.

What you need:

  1. A Klaviyo API key (found in Account Settings)
  2. The customer's email or Klaviyo profile ID
  3. A server-side or client-side script that fires when the action occurs
  4. The event name and any properties you want to track

Implementation approaches:

Server-side (recommended): Your backend sends the event to Klaviyo when the action occurs. This is reliable — it doesn't depend on the customer's browser or JavaScript loading. Use this for important events like quiz completion, purchases through custom flows, or loyalty tier changes.

Client-side (Klaviyo.js): Klaviyo's JavaScript library can track custom events in the browser. Use this for behavioral events like video watched, button clicked, or scroll depth reached. Simpler to implement but depends on the JS loading correctly.

Google Tag Manager: If you use GTM, you can fire Klaviyo custom events through custom tags triggered by GTM events. This lets your marketing team add event tracking without developer involvement for basic interactions.

Third-party integrations: Many apps integrate directly with Klaviyo and send custom events automatically. Quiz apps (Octane AI, Typeform), review apps (Judge.me, Stamped), and loyalty apps (Smile.io, LoyaltyLion) often have native Klaviyo integrations that push events without custom development.

Using Custom Events in Flows

Once events are tracking, build flows triggered by them:

Trigger: Custom event fires Filter: Add conditions based on event properties Action: Send email/SMS with dynamic content pulled from event properties

Example flow: "Quiz Completed" trigger, with a conditional split on quiz_result. If result is "dry skin," send the dry skin product email. If "oily skin," send the oily skin version. Each version shows relevant products pulled from the event properties.

The power is in the properties. The more data you attach to the event, the more personalized the follow-up can be.

Segmenting on Custom Events

Custom events also power segments. Some useful segments based on custom events:

  • "Completed quiz but never purchased" — follow up with stronger recommendation
  • "Signed up for back-in-stock notification in last 30 days" — high-intent segment for new arrivals
  • "Left a 5-star review" — brand advocates for referral and UGC campaigns
  • "Watched 3+ product videos" — high engagement, likely to convert
  • "Used size guide but didn't purchase" — might need additional sizing reassurance

These segments can be targeted with campaigns even when they're not in active flows. Your weekly campaign can exclude "open support ticket" and include "watched video but didn't purchase" for different messaging.

Event Property Design

Design your event properties thoughtfully. Once you start tracking, changing the property structure requires updating all flows and segments that use it.

Best practices:

Use consistent naming: snake_case for all property names (quiz_result, product_id, tier_name). Don't mix camelCase and snake_case.

Include identifying properties: Always include the product_id or product_name when the event relates to a specific product. This lets you show that product in follow-up emails.

Include categorical properties: Properties that enable segmentation (category, type, score, tier). These power conditional splits in flows.

Include timestamps: Klaviyo records when the event fires, but if timing is important (like when a subscription renews), include it as a property too.

Keep it flat: Don't nest objects deeply. Klaviyo handles flat properties better for segmentation and personalization. Instead of event.product.name, use product_name directly.

Monitoring and Debugging

After implementation, verify events are tracking correctly:

In Klaviyo: Go to a test profile. Check the Activity Feed. Your custom events should appear with their properties listed. If they don't show up, the API call isn't reaching Klaviyo.

Common issues:

  • Wrong API key (private vs. public key confusion)
  • Email doesn't match an existing profile (event creates a new profile or gets lost)
  • Properties formatted incorrectly (JSON parse errors)
  • Rate limiting (sending too many events too fast)

Testing workflow: Trigger the event yourself (complete a quiz, submit a review, etc.). Check the profile in Klaviyo within 5 minutes. Verify the event name and properties are correct. Then test the flow trigger.

What To Do Right Now

Identify one customer action on your site that indicates high purchase intent but isn't currently tracked in Klaviyo. Quiz completion, video views, and back-in-stock signups are the three highest-value starting points.

Then check if your existing tools (quiz app, review app, loyalty app) already integrate with Klaviyo. Many do — you might just need to enable the integration rather than building custom API calls.

If you want help setting up custom event tracking and building the flows that respond to them — book a call with our team. We'll identify your highest-value custom events and build the automation that turns them into revenue.

Mark Cijo

Written by Mark Cijo

Founder of GOSH Digital. Klaviyo Gold Partner. Helping eCommerce brands grow revenue through data-driven marketing.

Book a free strategy call →

Want results like these for your brand?

Book a free call. We'll look at your data and show you what's possible.

Pick a Time

15 minutes. No pitch deck. Just your data and our honest take.