Introduction
Creating custom events in Klaviyo is a powerful way to trigger personalized and automated marketing campaigns based on specific user actions. Custom events allow you to go beyond standard behaviors like purchases or email opens and track virtually any interaction on your website or app. This guide will provide a detailed walkthrough of how to set up custom events in Klaviyo, share best practices for triggering flows with custom events, and help you optimize your email and SMS strategies.

How Do I Create Custom Events in Klaviyo?
To create Klaviyo custom events, you need to define the event parameters, implement the event tracking code on your website or app, and configure Klaviyo to trigger flows based on these events. This setup enables highly targeted automations, such as sending a reminder email when a user completes a specific action like watching a video or clicking a unique button.
Step-by-Step Guide: Setting Up Klaviyo Custom Events
1. Determine Which Custom Events You Need
a. Identify Key Actions to Track
Examples of valuable custom events include:
Downloaded a Resource
Completed a Survey
Visited a Specific Page
Started a Free Trial
b. Define Event Properties
Each custom event can carry additional data through event properties, such as:
Resource Name: If tracking a download
Page URL: For page visits
Action Type: Like Click or Form Submission
2. Create the Custom Event Code
a. Use Klaviyo's Track API
Klaviyo's Track API is used to log custom events. The basic structure of the code looks like this:
javascript
CopyEdit
// Example of sending a custom event to Klaviyo window._learnq.push(['track', 'Resource Downloaded', { 'Resource Name': 'Ebook on Email Marketing', 'Category': 'Ebooks', 'Download Method': 'Form Submission' }]);
In this example:
"Resource Downloaded" is the name of the custom event.
The event properties include the resource name, category, and download method.
3. Implement the Code on Your Website
a. Add the Code to Relevant Pages
Place the JavaScript Code on the specific pages or within the actions where the custom event should trigger.
Example: Add the event code to a Thank You Page that loads after a form submission.
b. Test the Custom Event
Open your website and trigger the event manually.
Go to Profiles in Klaviyo and check if the custom event appears in the Activity Feed.
4. Create a Flow Using Custom Events
a. Navigate to Flows in Klaviyo
Go to Flows > Create Flow in your Klaviyo dashboard.
b. Select "Metric Triggered Flow"
Choose "When someone takes an action (Metric Triggered)" as the trigger type.
Select your custom event (e.g., "Resource Downloaded") from the Metric Dropdown Menu.
c. Design Your Flow
Add emails, SMS messages, or conditional splits to build a multi-step automation.
Example: Send a follow-up email offering more resources if a user downloads an Ebook.
Best Practices for Using Klaviyo Custom Events
1. Use Descriptive Event Names
Clearly describe the event’s purpose in the event name to avoid confusion when building flows.
Example: Use "Completed Purchase - High Value" instead of "Purchase Event".
2. Enrich Custom Events with Useful Properties
Include relevant data in event properties to allow for advanced segmentation.
Example: If tracking video views, add properties like "Video Length" and "Percentage Watched".
3. Test Your Events Thoroughly
Ensure events trigger correctly by simulating different scenarios on your website.
Regularly monitor the Activity Feed in Klaviyo to verify event data is flowing correctly.
4. Combine Custom Events with Segmentation
Create segments using custom events to target specific user groups.
Example: Build a segment for users who completed a survey and send a personalized thank you email.
Common Mistakes to Avoid When Setting Up Klaviyo Custom Events
Forgetting to Test Events: Always test events before activating flows.
Using Vague Event Names: Clear event names help with troubleshooting and flow management.
Not Utilizing Event Properties: Missing out on valuable data for segmentation and personalization.
Conclusion
Setting up Klaviyo custom events allows you to build highly personalized and automated marketing campaigns, enhancing customer engagement and driving conversions. By following the steps outlined in this guide, you can effectively create custom events, trigger flows, and optimize your marketing strategy.
📩 If your email and SMS marketing strategies are underperforming and you’re unsure how to set up custom events, let’s talk.
At Dispatch, we help brands maximize revenue from email & SMS without damaging subscriber engagement.
👉 Connect with Dispatch today to optimize your custom events and marketing strategy.
Comentarios