Send test groups to Klaviyo
What gets sent
When a visitor is assigned to a test, ABConvert records oneEntered ABConvert Test event on their Klaviyo profile with these properties:
The event fires once per visitor per test, on the page where the visitor is assigned. A visitor who lands in a different test group later gets a new event.
Setup
1
Turn on Klaviyo onsite tracking
The Klaviyo app for Shopify installs Klaviyo’s onsite script on your storefront. ABConvert uses that script, so no API key is needed for this part.
2
Turn on the integration
In ABConvert, go to Integrations, find Klaviyo under Marketing, and turn the switch on.
3
Verify the connection
Land in a running test as an identified visitor, for example by opening your store from a Klaviyo email. In Klaviyo, open your profile and look for
Entered ABConvert Test in the activity feed. The Integrations page can show Connected after ABConvert successfully hands the event to Klaviyo’s browser queue. Confirm the activity feed before treating this as Klaviyo receipt.Using the event in Klaviyo
- Segment: “What someone has done: Entered ABConvert Test at least once, where
test_nameequals Hoodie price test andtest_group_nameequals Variant A.” - Flow: trigger on the
Entered ABConvert Testmetric and split ontest_group_nameto send a different message per test group. - Campaign: send to the segment above.
Things to know
- Klaviyo attaches events to profiles it has identified. When anonymous visitor tracking is enabled in Klaviyo and the visitor grants the required consent, Klaviyo can retain activity in that browser for up to 14 days and attach it after identification. Shopify checkout identification also requires Klaviyo Shopify additional tracking. Visitors who never identify are not recorded.
- ABConvert’s current integration handoff is not an independent consent gate. Configure Klaviyo and your consent manager to suppress collection when consent is denied, then verify the real browser behavior before relying on it.
- Klaviyo’s onsite script runs on storefront pages, not inside checkout, so tests that only change checkout do not send this event.
- Renaming a running test changes
test_namefor visitors assigned after the rename. A segment built on the old name stops growing.
Target by Klaviyo segment
How it works
Add a Klaviyo segment condition to a test’s audience, choose a segment, and pick is in or is not in. When a visitor arrives, ABConvert checks whether their Klaviyo profile is in that segment and decides whether they enter the test. Only visitors Klaviyo has identified can be in a segment. Everyone else counts as outside every segment: is in excludes them and is not in includes them.Setup
1
Create a private API key in Klaviyo
In Klaviyo, go to Settings → API keys → Create Private API Key. Give it read access to Segments and Profiles (the
segments:read and profiles:read scopes) and nothing else.2
Connect the key in ABConvert
In ABConvert, go to Integrations, find Klaviyo audience targeting under Marketing, click Connect, and paste the key. ABConvert checks it with Klaviyo and never shows it again.
3
Add the condition to a test
In the test’s Targeting step, open Advanced conditions, find Klaviyo Segment, and add a condition. Pick the segment from the list and choose is in or is not in. Two conditions in the same row are OR; a second row is AND.
Things to know
- ABConvert checks membership at most once an hour per visitor, so a visitor who joins a segment is picked up on their next visit after that. Their test group never changes: a visitor who leaves the segment stops seeing the test, and returns to the same test group if they qualify again.
- A visitor’s first page view waits for the membership check, up to about a second and a half. If Klaviyo does not answer in time, the visitor sees your original store on that page and is checked again on the next one.
- ABConvert sends the browser’s Klaviyo identifier and the segments your tests reference. It receives back only whether the visitor is in each one. Configure the consent policy for this lookup before you use audience targeting.
- If the key stops working, the Integrations page shows Action needed, and tests that target a Klaviyo segment cannot be launched until you connect a new key. Running tests keep serving.
- The segment list refreshes every five minutes. A segment you delete in Klaviyo keeps its id in the test; replace it with a current segment.