Skip to main content
Sonar: Data Enrichment for Klaviyo

Maximizing your email marketing with Sonar data enrichment for Klaviyo

Chaim Davies avatar
Written by Chaim Davies
Updated over a month ago

Overview

With Sonar by Triple Whale, you can now enhance Klaviyo's ability to collect and connect onsite user activity by leveraging Triple Whale's first-party pixel data. This feature aims to fill the gaps left by the Klaviyo web pixel by connecting more events back to your existing Klaviyo profiles.

By connecting more events to existing profiles, eCommerce marketers can send more effective "Abandon Browse" and "Abandon Cart" flow emails, capturing otherwise lost revenue and optimizing your email marketing strategies.

For customers who leverage Triple Whale Post-Purchase Surveys, Sonar can also send survey responses to Klaviyo for building segments based on survey responses.

How It Works

Sonar leverages the Klaviyo Events API to send Triple Whale's event stream, server-side, as custom events. These custom events can be used to set up additional flows that target users not caught by the default Klaviyo flows.

By default, Sonar will send the following events to Klaviyo:

  • "Active on Site - Triple Pixel" - sent every time the Triple Pixel detects a new session

  • "Viewed Product - Triple Pixel" - sent every time the Triple Pixel detects a view of a product page

  • "Added to Cart - Triple Pixel" - sent every time the Triple Pixel detects an "Add to Cart" action on your site

  • "Checkout Started - Triple Pixel" - sent every time the Triple Pixel detects someone initiating a Checkout

  • "Survey Answer - Triple Pixel" - sent every time a customer completes a post-purchase survey (for customers who use Triple Whale's Post-Purchase survey app)

In cases where the Triple Pixel is able to connect an event with a known visitor, Sonar will automatically send the Klaviyo profile associated with the action to help Klaviyo connect the event to an existing profile.

Before You Begin

Before we are ready to configure Sonar, make sure you confirm that the Triple Pixel is properly installed on your site.

To send all Standard events, including checkout funnel events, participants must have the following pixel installation configuration:

  • Theme App Embed installed and enabled ✔️

  • Web Pixel Extension enabled ✔️

    • The Web pixel extension is required in order to send Checkout funnel events like "Initiate Checkout" or "Add Payment Info".

Sonar for Headless Shopify stores, BigCommerce stores, and WooCommerce stores

Please note that Headless Shopify stores as well as stores built on BigCommerce or WooCommerce will require developer implementation in order to enable Sonar. See the relevant documentation:

To verify this setup, visit your Pixel Settings page and review the “Installation Status” section. In the “Online Store” section, you should see the Theme App Embed enabled:

Then, in the Checkout section, you should see the Web Pixel Extension enabled:

Configuring Sonar

Before we are ready to configure Sonar, make sure you have connected your Klaviyo account to Triple Whale.

Updated Klaviyo Connection

If you’ve previously used an API key to connect your Klaviyo account, you will need to disconnect and reconnect Klaviyo to provide the required permissions for sending enriched session data.

Once your Klaviyo account is connected, head to the Sonar Settings page. In the Klaviyo tile, select Configure.

Select which events to send from Triple Whale to Klaviyo. Choose our recommended Default Settings to pass all available data back to Klaviyo. Alternatively, you can limit the specific events and properties to send to Klaviyo.

Next, specify how to handle scenarios where a visiting device to your shop is connected to multiple known Klaviyo profiles. We recommend the first option, Send to the Klaviyo session profile..., as this will avoid sending duplicate messages to the same user (if the user has multiple emails on file).

Once you are satisfied with the configuration settings, click Save & Enable. If you aren't ready to go live with Sonar for Klaviyo but would like to save your configuration settings for another time, click Save Configuration.

Delivery Overview

To monitor the data transmission to Klaviyo within Triple Whale, head to Sonar Settings and click View Details to access the Data Overview page. The data table displays the total number of enriched events, broken out by event type over the chosen time frame, as broadcasted to Klaviyo.

Finding the Data in Klaviyo

Events will begin sending through the Events API and will appear in the Klaviyo Metrics page as:

  • "Active on Site - Triple PIxel"

  • "Viewed Product - Triple Pixel"

  • "Add to Cart - Triple Pixel"

  • "Checkout Started - Triple Pixel"

Configure New Abandonment Flows

Setting up abandonment flows in Klaviyo using Triple Whale's enriched events can significantly improve your email targeting, helping you recover more lost sales.

If a user visits your site, views a product, and adds items to their cart but does not complete the purchase, Triple Whale's Sonar data can trigger an "Abandon Cart" email — even if Klaviyo's default pixel did not capture the event (or Klaviyo captured the event but was unable to connect it to a known Klaviyo profile). This additional data ensures more comprehensive email targeting, helping you recover otherwise lost sales.

Set up New Flows

Here are the step-by-step instructions to configure these flows effectively.

Create Your New Flows

  1. Clone Flow: In your Klaviyo account, clone your existing "Abandon Browse" or "Abandon Cart" flow to use it as a template for the new flow. (If you don't have an existing abandonment flow and would like to create one, you can just create a new flow and use the Sonar event as the trigger).

  2. Clone Name: Title the Cloned flow, adding -TW at the end (so we can track the lift).

  3. Modify Trigger Event: Replace the default trigger event, such as "Viewed Product" or "Added to Cart," with the corresponding Triple Whale custom event (e.g., "Viewed Product - Triple Whale")

Add Flow Filters

Configuring the correct flow filters will help ensure that only customers who have not received your original Abandonment flow will receive your Sonar triggered flow.

  1. Exclude visitors who went on to place an order

    1. If you cloned your standard flow, there should already be existing filters to exclude visitors who have gone on to Complete Checkout.

    2. If this filter doesn't exist, add a new profile filter with the +AND condition:

      1. When someone has done (or not done)

      2. Placed Order

      3. Zero times

      4. Since starting this flow

  2. Exclude Visitors who have done the standard event that corresponds with the Sonar event used as your trigger

    1. Add a new profile filter to ensure that users who have received the default flow are excluded from receiving the cloned flow. To do this, add a new profile filter condition +AND:

      1. What someone has done (or not done)

      2. Added to Cart (or any other corresponding standard event)

      3. Zero times

      4. Since starting this flow

  3. Exclude visitors who have already received your original flow:

    1. Add another profile filter with the +AND condition:

      1. When someone has done (or not done)

      2. Received Email

      3. Where Flow = {choose your existing standard abandonment flow}

      4. Zero Times | in the last 1 days

  4. Exclude visitors who viewed a product that is out of stock [Browse Abandonment / Product Viewed Flows]

    1. Create a new Trigger Filter:

      1. 'Variant Inventory Quantity' Is Greater than 0

  5. Add some time buffer to your time delay step (optional)

    1. You may also want to add an additional time-based action to delay the cloned flow by 10 minutes or more to ensure that your original flow has time to execute before sending emails from the cloned flow.

  6. Save Your Flow: After configuring the trigger and exclusion rules, save your changes.

Update Dynamic Field Content

If your flow emails contain flow filters based on product fields, or if they contain dynamic content, ensure they are updated to the proper Sonar event fields to ensure the filters execute and the proper email content is populated.

In your flow, find any message with dynamic content. Click the three dot menu and select Edit.

Locate any content with dynamic fields, such as the product feature field in the screenshot below. Any dynamic fields should be updated with the case-sensitive text related to the product associated with the trigger event.

For a list of available dynamic product fields, click Preview & Test and review the Event Properties in the righthand column. Click on the desired property to copy it.

Avoid Editing Universal Content

If the content in your emails features universal content, be sure to Unlink and edit independently to avoid altering the dynamic fields in unrelated flows where different fields are required.

Closing the preview and returning to the editor, replace the existing dynamic field/s with the properties you just copied. Once you have replaced all dynamic product fields, click Preview & Test again to ensure that the dynamic content is populating correctly. You may also want to send yourself a test email to verify that all links go to the desired destination.

Price & Currency Fields

Unlike some standard flows, Sonar sends the price and currency fields separately. In updating fields in your flow, ensure adding both dynamic fields so as to display the price along with the currency denomination, or use the currency format function: {% currency_format event.Price|floatformat:2 %}.

Once you are done, you can save the email. Continue to make the same updates for each message in your flow.

Updating Checkout Abandonment Flows

For checkout abandonment flows, the dynamic content of the email often contains dynamic tables (like a list of the items in the cart). Because carts can contain any number of products, the field schema in the Sonar Checkout Started event differs from the other events in order to support loading the content into a dynamic table element.

To configure a dynamic table that displays a list of cart contents:

  • Click on the email element that contains the dynamic table

  • Go to Table Settings

  • In the variable list settings, paste the name of the row collection field

    • For instance, for the list of products in the cart, use event.extra.line_items

  • Alias the row (in the case of an item list, you can leave the existing row alias of item)

  • Whenever you want to reference a property of an item in the list of cart contents, the dynamic field can now be appended with the alias "item" to allow iteration through the list of items.

    • For instance: {{ item.product.title }} will grab the list of item product titles and display each instance in a table row.

Previewing Your Segment

Before you configure your new Abandonment flow using Triple Whale’s enriched events, you may want to get a sense of how many additional customers you will reach with your new flow.

To understand how many more visitors would have received abandonment emails once configured, you can use Klaviyo's Lists and Segments tool.

Create a new segment, and configure it with the following AND conditions:

  1. Definition 1:

    1. When someone has done (or not done)

    2. Person has Added to Cart - Triple Pixel

    3. At least once

    4. In the last 7 days

  2. +AND Definition 2:

    1. When someone has done (or not done)

    2. Person has Added to Cart

    3. zero times

    4. In the last 7 days

The segment builder will now give you a preview of the number of segment profiles that would have received the enriched Triple Whale abandonment flow in the last 7 days.

Dynamic Fields List

Below is a list of all the dynamic fields available for Klaviyo, broken out by trigger event.

Added To Cart - Triple Pixel

Field

Example Value

Dynamic Markup

Compare At Price

65

{{ event|lookup:'Compare At Price'|default:'' }}

Formatted:

{% currency_format event|lookup:'Compare At Price'|floatformat:2 %}

Currency

"$"

{{ event.Currency|default:'' }}

Image Url

{{ event|lookup:'Image Url'|default:'' }}

Price

65

{{ event.Price|default:'' }}

Product Id

3998565269613

{{ event|lookup:'Product Id'|default:'' }}

Product Name

"Eva Bangs Hair Extension"

{{ event|lookup:'Product Name'|default:'' }}

Quantity

1

{{ event.Quantity|default:'' }}

Shop Url

"madisonbraids.com"

{{ event|lookup:'Shop Url'|default:'' }}

Sku

"BNGDB"

{{ event.Sku|default:'' }}

Url

{{ event.Url|default:'' }}

Variant Id

29735044186221

{{ event|lookup:'Variant Id'|default:'' }}

Variant Title

"Dark Brown"

{{ event|lookup:'Variant Title'|default:'' }}

Viewed Product - Triple Pixel

Field

Example Value

Dynamic Markup

Compare At Price

65

{{ event|lookup:'Compare At Price'|default:'' }}

Currency

"$"

{{ event.Currency|default:'' }}

Image Url

{{ event|lookup:'Image Url'|default:'' }}

Price

65

{{ event.Price|default:'' }}

Product Id

3998565269613

{{ event|lookup:'Product Id'|default:'' }}

Product Name

"Eva Bangs Hair Extension"

{{ event|lookup:'Product Name'|default:'' }}

Shop Url

"madisonbraids.com"

{{ event|lookup:'Shop Url'|default:'' }}

Sku

"BNGDB"

{{ event.Sku|default:'' }}

Url

{{ event.Url|default:'' }}

Variant Id

29735044186221

{{ event|lookup:'Variant Id'|default:'' }}

Variant Title

"Dark Brown"

{{ event|lookup:'Variant Title'|default:'' }}

Checkout Started - Triple Pixel

Dynamic markup examples below assume you have aliased the line_item row collection as “item” when configuring a dynamic table element in your message.

Field

Description

Example Value

Dynamic Markup

$value

Total price of all items in cart

99.98

{{ event|lookup:'$value' }}

Item Count

Count of cart items

2

{{ event|lookup:'Item Count }}

Items

List of product names. Can be used in dynamic table settings as a “row collection” to load the dynamic list of product names

“Lulu Two Strand = Braided Hairband”

{{ event.Items }}

line_items

Product Names of each item in cart.

Can be used in dynamic table settings as a “row collection” to load the dynamic list of cart contents

"The Bree Ponytail Extension"

{{ event.extra.line_items }}

checkout_url

The checkout url

{{ event.extra.checkout_url }}

compare_at_price

Nested in the line_items. To use the field in a dynamic table, the example assumes you have aliased the line_items row collection as “item”

49.99

{{ item.compare_at_price }}

product.handle

The url slug for the product.

Can be used to compose a link to the product page.

Example assumes you have aliased the line_items row collection as ‘item’.

two-strand

{{ organization.url|trim_slash }}/products/{{ item.product.handle }}

product.id

The product id.

9599055947

{{ item.product.id }}

product.images.0.src

The main product image

{{ item.product.images.0.src }}

product.images.0.thumbSrc

The product thumbnail

{{ item.product.images.0.thumbSrc }}

variant.id

The variant id

12307243696235

{{ item.product.variant.id }}

variant.sku

The variant sku

TSHL

{{ item.product.variant.sku }}

variant.title

The variant title

Highlighted

{{ item.product.variant.title }}

vendor

The Item’s vendor

Madison Braids

{{ item.product.vendor }}

presentment_currency

The items currency

USD

{{ item.presentment_currency}}

token

The user’s cart token

07d01e08aac61f0fef5ccfb95dcc8b8b

{{ item.token }}

Active On Site - Triple Pixel

Field

Example Value

Dynamic Markup

Page

{{ event.Page|default:'' }}

Os

"Linux armv81/Android"

{{ event.Os }}

Browser

"Chrome"

{{ event.Browser }}

Building Segments from Post-Purchase Survey Responses

If you are using Triple Whale's post-purchase survey tool to collect survey responses from your customers, you can elect to have Sonar send customers' survey responses back to Klaviyo as an event. By doing so, you will have the ability to build segments from your survey respondents based on their answers to your survey questions.

In Klaviyo, survey responses will appear as the metric "Survey Answer - Triple Pixel". Any time a post-purchase survey is submitted, this event will be sent to Klaviyo. The properties of the event will correspond to the questions in your survey, and the values of those properties will be set to the answers provided by the customer.

To use this data for building a segment:

  1. Go to Audience > Segments & Lists in Klaviyo

  2. Click Create New > Create Segment

  3. In the segment builder, configure the following conditions:

    1. What Someone has done (or not done)

    2. Person has

      1. "Survey Answer - Triple Pixel"

      2. At Least once

      3. in the last X days

    3. Add a filter

    4. Where {select your question} equals {select your desired response value}


Frequently Asked Questions

1. How does Sonar handle visitor opt-outs?

  • In cases where a visitor to your site has opted out of tracking, the Triple Pixel will not fire and collect any data about that user's visit, and Sonar will not send any data about that visitor to Klaviyo.

2. What if I already have a Klaviyo enrichment solution in place?

  • If you have an existing solution in place for enriching Klaviyo with additional visitor and event data, it is safe to run Sonar in parallel. Every event that Sonar sends to Klaviyo is sent as a custom event specific to Triple Whale and will not interfere with default Klaviyo event tracking or events from other providers.

3. We are hearing complaints about users receiving multiple emails. How can this be resolved?

  • If you receive complaints about sending duplicate emails to irrelevant email addresses, change the Sonar Settings to only send to the Klaviyo session profile or the last used email.

4. Why are events appearing in Triple Whale but I am not seeing them in Klaviyo?

Did this answer your question?