Create A/B tests by chatting with AI and launch them on your website within minutes.

Try it for FREE now

Klaviyo

Last updated

Quick answer

Klaviyo is an email and SMS platform built for ecommerce. Stores use it to segment shoppers and to send flows. In A/B testing, it helps ecommerce teams connect a page change to purchase behavior, revenue quality, and customer trust.

Key takeaways

  • Klaviyo segments and messages customers. Mida assigns the on-site variant and can attach that variant to the Klaviyo profile.
  • The integration is two-way: klaviyo.track() for exposure and conversion, and Klaviyo form submits captured as Mida goals.
  • Events land on the identified profile when Klaviyo already knows the person, and on the anonymous Klaviyo id otherwise.

Definition

Klaviyo is an email and SMS platform built for ecommerce. Stores use it to segment shoppers and to send flows. In an A/B test it is both a source of on-site conversion events and a place that can receive the variant a shopper saw.

What Klaviyo means in A/B testing

Klaviyo's model is the profile: purchases, browses, and form submits update segments, and segments drive flows. A website experiment needs a way into that profile, or the email program never learns which headline the shopper saw. The on-site form is often the conversion the page test is trying to move. Those are two directions, and they should not be collapsed into one event.

Why Klaviyo matters

A landing-page test that lifts form submits can still produce worse customers, and a test that looks flat on the page can change who enters a welcome flow. Passing the variant into Klaviyo lets the flow match the promise on the page. Capturing the form submit inside the experiment lets you call the page test without waiting for a later purchase you did not hypothesize. Mixing the email experiment and the page experiment in one metric makes both unreadable.

Example of Klaviyo

A Shopify store tests two homepage promises. Variant B says "members get early access." Mida sends mida_execute to Klaviyo with that variant. A Klaviyo segment "saw variant B" enters a welcome flow that repeats the early-access offer. The primary goal in Mida is the Klaviyo form submit, not the email open. The purchase remains a guardrail metric so a cheaper lead does not get shipped if revenue per visitor falls.

How to use Klaviyo

Load klaviyo.js and the Mida snippet, then enable the integration. Pick the embedded form as the goal when the page is trying to grow the list. Build the Klaviyo segment from the variant property after you have seen a test event on a known profile. Do not start a second subject-line experiment in Klaviyo against the same people in the same week without writing down that the two tests overlap.

Common mistake

A common mistake is judging the page variant by email revenue that includes people who never saw the page. Another is expecting a brand-new anonymous browser to appear as a named Klaviyo profile the moment the variant is assigned. The event waits on the identity Klaviyo already has.

How Mida works with Klaviyo

The Klaviyo integration is bidirectional and uses the Klaviyo web SDK, so it is not tied to one store platform. Outbound, Mida calls klaviyo.track() with mida_pageview, mida_execute, and mida_conversion, each tagged with the variant. Inbound, Mida wraps Klaviyo's tracking function and records form submits and other Klaviyo events as goals, including the klaviyo-form-submit event.

If the shopper is already identified, the events attach to that profile. If not, they attach to the anonymous Klaviyo cookie id. The integration page's documented uses are a segment such as "saw variant B," a form submit as the conversion, tests on landing pages that Klaviyo flows send people to, and showing a Mida personalization to a Klaviyo segment such as VIP customers. You need window.klaviyo and the Mida snippet on the page. Price and storefront tests that those flows point at are covered in Shopify A/B testing for pricing.

Related A/B testing terms

FAQ

Does a Klaviyo flow count as the experiment?

No. A Klaviyo flow can split an email, and that is Klaviyo's own test. The Mida integration is about the website: which landing-page variant a person saw, and whether a Klaviyo form on that page submitted. Keep those two splits separate so you do not treat an email subject-line test as a page test.

Will anonymous shoppers get a Klaviyo profile just because they saw a variant?

The integration uses whatever identity Klaviyo already has. A known profile, from a past submit or an email click, receives the events. Otherwise they stay on Klaviyo's anonymous cookie id until the shopper identifies themselves.

Can I use a Klaviyo popup submit as the primary metric?

Yes, when the hypothesis is about the popup or the page that holds it. Mida listens for the embedded form submit and can select it as a goal. If the hypothesis is a purchase, keep the order as the primary metric and treat the popup submit as a secondary or guardrail metric.

Try the A/B Testing Tool That's Free Up to 100K Monthly Tracked Users

Visual editor, AI-generated variants with MidaGX, redirect testing, and GA4 integration — free forever in the Mida Sandbox. No credit card required.

Decorative graphicDecorative graphicDecorative graphicDecorative graphic