- Klaviyo abandoned cart and browse abandonment flows only reach profiles that Klaviyo has identified with an email address or phone number.
- Klaviyo identifies visitors through _kx email links, sign-up forms, its JavaScript API and supported checkout integrations, and keeps the result in the __kla_id cookie.
- The ROASaurus checkout booster identifies shoppers Klaviyo does not know yet at Shopify checkout and sends their cart through Klaviyo's API as Viewed Product, Added to Cart and Started Checkout, so check which metric each flow triggers on.
- With Respect visitor consent on, the booster runs only for shoppers who allow marketing cookies.
- The booster rebuilds activity from the cart, so it cannot add products the shopper only looked at.
A Klaviyo abandoned cart flow can only email a shopper that Klaviyo has identified: a profile with an email address or phone number, linked to the browser the person shops in. Anonymous visitors still add products to their cart, but Klaviyo cannot tie that activity to a person, so no flow starts for them.
This guide explains how Klaviyo identifies visitors, which shoppers it misses, and how the ROASaurus Klaviyo connection identifies more of them at Shopify checkout. It also covers consent, customer segments for your flows, setup and testing, and what the connection cannot do.
Why do abandoned cart flows only reach identified visitors?
Klaviyo flows start from metrics. A browse abandonment flow starts from Viewed Product. An abandoned cart flow starts from Added to Cart or, in most pre-built flows, from Started Checkout. On Shopify, the checkout metric from Klaviyo's Shopify integration is named Checkout Started. Every one of these events belongs to a profile, and Klaviyo needs contact information to create a profile.
Klaviyo's onsite JavaScript tracks product views and adds to cart for browsers it can identify. When an unknown visitor looks at a product, there is no profile to attach the event to, so the event cannot start a flow. The number of visitors Klaviyo recognizes therefore limits how many people your flows can reach. Better email copy does not change that limit. Recognizing more shoppers does.
How does Klaviyo identify a visitor?
Klaviyo links a browser to a profile in a few ways. Each one needs the visitor to do something first.
| Method | What happens | Who it covers |
|---|---|---|
| Click in a Klaviyo email or SMS | Klaviyo adds a _kx URL parameter with an encrypted value to the website links in your emails. Its script sends that value to Klaviyo, which identifies the visitor. Identifying links in Klaviyo SMS messages can do the same. | People already on your list who click |
| Klaviyo sign-up form | The visitor submits an email address or phone number in a popup or embedded form. | Visitors who fill in a form |
JavaScript API (klaviyo.identify) | Your own code sends an email address or phone number, for example after a login. | Sites with custom development |
| Checkout, through a supported integration | Klaviyo can identify visitors during checkout. On Shopify this needs anonymous activity tracking and behavioral events turned on, and the visitor must accept marketing and analytics cookies. | Shoppers who reach checkout and consent |
After identification, Klaviyo's script keeps an encrypted token named $exchange_id in the __kla_id cookie. Klaviyo sets this cookie for 2 years, but browsers can shorten that. Klaviyo's own documentation says Safari deletes the JavaScript-set cookie after 7 days of browser use without interaction with your site. Our guide to Safari ITP and tracking explains that limit in more detail.
Klaviyo also has an anonymous visitor activity backfill feature. When a visitor allows tracking but is not identified, Klaviyo keeps their Viewed Product and Added to Cart events in the browser's local storage. Once the visitor is identified in that browser, Klaviyo sends the events to the profile with their original timestamps. They can then trigger flows if the profile qualifies. The setting is on the Tracking page of your Klaviyo settings, under onsite identification. It has limits too: Safari can delete local storage after 7 days of browser use without a visit to your site, and activity before consent is not stored.
Which shoppers does Klaviyo miss?
The gap is largest for shoppers who reach checkout without any earlier contact with Klaviyo:
- First-time visitors from an ad who never clicked an email and closed the popup.
- Returning customers on a new phone, a new browser or a cleared browser.
- Safari visitors whose cookie was deleted after 7 days of browser use without a visit to your site.
- Visitors who declined cookies. Klaviyo does not track them, and that is correct.
Here is a worked example for one month in an example store. 1,200 shoppers submitted their contact details at checkout. Klaviyo already knew 480 of them. That leaves 1,200 − 480 = 720 shoppers with no Klaviyo history from before checkout. Of those, 65% allowed marketing cookies: 720 × 0.65 = 468 shoppers. The other 252 declined.
How does the ROASaurus checkout booster work?
The booster is part of the ROASaurus checkout pixel, the custom pixel you add in Shopify's Customer events. It waits for the moment a shopper submits their email address or phone number at checkout. Then it does the following:
- It reads Klaviyo's
__kla_idcookie. If the cookie holds an$exchange_id, Klaviyo already knows this shopper, and the booster stops. - If not, it sends one request from the shopper's browser to Klaviyo's client API, with your public API key (the site ID). The request identifies the profile by email, or by phone when there is no email.
- In the same request it records the cart: a Viewed Product and an Added to Cart event for each cart line, then Started Checkout.
The events carry the product ID, variant ID, product name, price, quantity, product URL and image, so your flow templates can show the right products. Started Checkout carries the checkout URL, the items and the checkout total. The booster dates the cart events back by one minute or more per cart line, so they land in a natural order before Started Checkout. For a cart with two lines, the profile receives five events:
__kla_id · no $exchange_idKlaviyo does not know this shopper yetViewed Product · t−150s · $45.00Canvas toteAdded to Cart · t−120s · $45.00Canvas tote, quantity 1Viewed Product · t−90s · $30.00Leather walletAdded to Cart · t−60s · $60.00Leather wallet, quantity 2Started Checkout · t−0s · $105.00Checkout URL and both itemsWhich Klaviyo metric do the events land in?
Klaviyo keeps metrics apart by source. Events from its Shopify integration and events sent through its APIs are separate metrics, even when they have the same name. The booster's events come through Klaviyo's client API. Its checkout event is named Started Checkout, while the checkout metric from Klaviyo's Shopify integration is named Checkout Started. A flow that triggers on Shopify's Checkout Started therefore does not start from the booster's event. Klaviyo's onsite script sends Viewed Product and Added to Cart through Klaviyo's API too, so the booster's events of those names may share those metrics. Klaviyo does not state this directly, so check it in your account with the test checkout described below.
What about consent?
With Respect visitor consent on, which is the default in Store settings, the checkout pixel reads Shopify's customer privacy settings. The booster runs only when the shopper allows marketing cookies. For a shopper who declines, the booster sends nothing to Klaviyo. Klaviyo's own checkout identification on Shopify also needs consent: the shopper must accept marketing and analytics cookies.
The other option, Always track, runs the booster for every shopper. Use it only where consent is not required. Our guide to Consent Mode v2 and the GDPR and the consent help page explain how the setting works across ROASaurus.
The browser only ever sees your public API key, the same site ID that Klaviyo's own onsite script uses. A private API key, if you add one for audiences, is stored encrypted on the ROASaurus server and is never sent to the browser.
How can customer segments improve your flows?
A second part of the Klaviyo integration works in the other direction. With a private API key that has the lists:write and profiles:write scopes, ROASaurus keeps a customer audience in a Klaviyo list and refreshes it every day. Build it on the Audiences page from all customers, one of the 11 RFM segments from Customers & LTV, such as Champions or At risk, or your own rules, such as predicted LTV or products bought. Only people with marketing consent are sent. Each member gets these profile properties:
roasaurus_segment,roasaurus_orders,roasaurus_revenueandroasaurus_last_orderroasaurus_predicted_ltv_12m: predicted revenue over 12 monthsroasaurus_expected_next_12m: expected revenue over the next 12 months
In an abandoned cart flow, a conditional split on roasaurus_segment lets you treat customers differently. For example, send Champions and Loyal customers a plain reminder, and keep a discount for people who have never ordered. Only customers in a synced audience have these properties, so new shoppers fall into the branch for profiles without them. Sync the All customers audience if you want every past customer to carry them.
As a safety rule, a sync that would remove a large part of a list is not applied. On a list with 30 or more members, a run that would remove more than a third of the members, or empty the list, is paused. The audience shows as paused until a later run is stable.
| Members now | Run would remove | Share removed | Result |
|---|---|---|---|
| 20 | 15 | 75% | Applied: the list has fewer than 30 members |
| 300 | 90 | 30% | Applied: 90 is not more than 300 ÷ 3 = 100 |
| 300 | 120 | 40% | Paused: 120 is more than 100 |
| 45 | 45 | 100% | Paused: the run would empty the list |
Stopping an audience in ROASaurus leaves the Klaviyo list as it is.
How do you set it up and test it?
- Add the Klaviyo pixel
In ROASaurus, open Tracking & platforms, click Add pixel on the Klaviyo card and paste your public API key, the 6-character site ID.
- Add the checkout pixel in Shopify
In Shopify admin, go to Settings › Customer events › Add custom pixel. Paste the snippet from your Tracking & platforms page. The Shopify setup guide lists each step.
- Check your consent setting
Keep Respect visitor consent on unless you sell only where consent is not required.
- Place a test checkout
In a private browser window, add two products, go to checkout and enter an email address you control that Klaviyo has never seen. Accept marketing cookies if your banner asks.
- Check the profile and the flow triggers
In Klaviyo, open the new profile. You should see Viewed Product, Added to Cart and Started Checkout. Then open each abandonment flow and confirm that its trigger metric is the metric your test events appear under. Metrics with the same name can come from different sources, so compare the source icon next to each metric name.
- Optional: add audiences
Add a private API key with
lists:writeandprofiles:writeto the Klaviyo pixel, then create an audience on the Audiences page and add Klaviyo as a destination.
Two more checks in Klaviyo help. Follow Klaviyo's advice and run the Added to Cart and Started Checkout flows separately, with a filter that removes people who started checkout from the Added to Cart flow. The booster records Started Checkout right after the cart events. If that filter uses the same checkout metric as your test shopper received, these shoppers do not get a second reminder from the Added to Cart flow. And if you also use Klaviyo's own checkout identification or the anonymous activity backfill, your test checkout shows whether a shopper receives events from both.
What can the booster not do?
- Identifies shoppers Klaviyo does not know when they submit contact details at Shopify checkout
- Records each cart line as Viewed Product and Added to Cart, then Started Checkout
- Leaves shoppers alone when Klaviyo already knows them
- Follows your consent setting
- Send emails: your Klaviyo flows decide that
- Record products the shopper viewed but did not add to the cart
- Identify visitors who leave before the checkout contact step
- Work outside Shopify checkout
- Set the __kla_id cookie, so Klaviyo's own script does not recognize the browser on a later visit
- Identify shoppers who declined marketing cookies while consent is respected
ROASaurus also uses Klaviyo signals for its own reports. When a visitor submits a Klaviyo form, the ROASaurus script links that email to the visitor. It reacts to the form submit and never reads keystrokes. Visits with a _kx parameter, a utm_source of klaviyo or a utm_medium of email count as the email channel in attribution. Under Channels, ROASaurus also shows the revenue Klaviyo attributes to each campaign and flow, next to its own click-based numbers and the profit after Klaviyo's cost. Attribution itself counts email through clicks.
Sources
- Klaviyo Help Center: Understanding cookies in Klaviyo
- Klaviyo Help Center: How to create an abandoned cart flow
- Klaviyo Help Center: How to create a browse abandonment flow
- Klaviyo Help Center: Understand Klaviyo's anonymous visitor activity backfill
- Klaviyo Help Center: Shopify data reference
In ROASaurus
- Klaviyo integration
- Lifetime value and RFM segments
- Help: set up ROASaurus on Shopify
- Help: consent and privacy