Macbook with Shopify logo, 2 people chatting in background

A guide to integrating Klaviyo with Shopify

Shopify is one of the most popular and innovative ecommerce platforms available today, used by merchants across the world to sell products on sophisticated and easy-to-use websites. But once you have set up your ecommerce store, how do you ensure that you get the maximum possible number of sales from both new and existing customers?

There are many software products on the market that can help with this and one of the best is Klaviyo. In this article, we’ll discuss why and how you should integrate Klaviyo with your Shopify store to support your online business as it grows. Click on one of the links below to jump to that section:

  • Why integrate Shopify with Klaviyo?
  • How to integrate Klaviyo with Shopify
  • Shopify metrics
  • Frequently asked questions


Why integrate Shopify with Klaviyo?

In short, integrating your Shopify account with the Klaviyo email marketing platform will enable you to target customers more effectively using custom audience targeting. A Klaviyo integration gives you the opportunity to remarket and upsell products to your existing customer base, grow your subscriber list and harness the power of intelligent marketing automation to convert interested browsers into loyal customers.

The following are examples of the many ways Klaviyo marketing campaigns can support your growing online business on Shopify:

  • Segmentation of data – This allows you to send a highly targeted email marketing campaign based on customer attributes, purchase behaviour or interest (for example, if users visited specific landing pages, you could send an offer based on this).
  • Richer data – Klaviyo’s innovative data tools don’t just look at what customers have bought or added to their baskets, but also their behaviour and how they interact with your site. More meaningful data enables you to present customers with the most targeted and relevant content in your email campaigns.
  • Sophisticated automation – Integrating Klaviyo with Shopify gives you access to sophisticated automation rules that, among other things, can help turn abandoned shopping sessions into more sales by automatically sending re-marketing emails to customers who did not complete checkout on your website.
  • Detailed workflows – With detailed workflows, you can send targeted communications to customers via email or SMS which are triggered by certain activities, such as an enquiry or an abandoned cart.


How to integrate Klaviyo with Shopify

Adding the integration

Integration simply involves adding some snippets of code provided by Klaviyo to your Shopify store. This can easily be added by clicking 'Integrations' in the left-hand menu followed by 'Integrating a new service' and entering the corresponding code.

Shopify settings

If you ever wish to update your Shopify settings, simply return to the Integration settings page, make the changes and then click 'Update Settings'.

Adding and testing onsite JavaScript

Klaviyo’s onsite JavaScript, known as ‘active on site web’ tracking or Klaviyo.js, tracks when customers visit your store. The team at Klaviyo recommends that you tick the box labelled “Automatically add Klaviyo onsite JavaScript” on your Shopify Integration settings page to activate this.

Signup forms

You can tick the 'Collect Email Subscribers' box to automatically add all customers who sign up to your default Shopify signup form or accept email marketing at checkout.


Shopify metrics

Integrating Klaviyo with Shopify gives you access to more detailed metrics from your ecommerce store, including Checkout Started, Cancelled Order, Fulfilled Order, Placed Order and Refunded Order. These can be particularly helpful when creating sales funnels or automating processes based on specific events in a customer's purchase history.

  • Checkout Started – This is tracked when a customer enters their contact and shipping information at the start of the Shopify checkout process and clicks continue. Klaviyo will track all of the information about the products in a customer’s cart so that this information can be used to create an abandoned cart email should the customer not complete the purchase. Metrics you can use to segment Checkout Started events include cart value, items, collections and discounts.
  • Cancelled Order – A cancelled order occurs when a customer creates an order but then cancels it before fulfilment. Klaviyo will track product information about all of the items in the customer’s cart to trigger abandoned cart emails. Like Checkout Started events, Cancelled Order events can be filtered and targeted based on cart value, items and discounts.
  • Fulfilled Order – This metric simply tracks orders that were successfully processed and shipped by your fulfilment centres. It can be filtered and tracked by the same criteria as Checkout Started and Cancelled Order events. Fulfilled Order metrics can be used for purchase follow-up emails.
  • Placed Order – These events track when customers successfully follow through with the checkout process and create a Shopify order. Klaviyo uses the information from these events to send purchase follow-up emails to customers. As well as value and item filters, you can target Placed Order events based on the source name, such as Shopify POS or mobile.
  • Ordered Product – This also tracks when an order is placed, but creates a separate event for each item purchased by the customer. The information Klaviyo tracks can be used to monitor behavioural segments from product variants and other metrics not tracked through Placed Order events.
  • Refunded Order – This is tracked when a customer has completed the checkout process and made their payment, but has requested this payment be returned. Klaviyo only tracks this metric based on fully refunded orders, not partial ones.


Frequently asked questions

How do you import email subscribers from Shopify to Klaviyo?

Go to Integrations, choose Klaviyo and click Connect. You will then be taken to a page where your Shopify API key is displayed. Copy this string of numbers and letters.

Next, go back to Integrate on your Shopify store's Dashboard (by clicking Integrations again) then select Integrating Services. You'll see Klaviyo highlighted there by default—just click Enable Integration and enter the API key when prompted.

How do you link the Shopify pop-up signup form to Klaviyo?

To integrate the Klaviyo sign-up form with your Shopify store, you'll first need to grab the code from Klaviyo.

Next, go to Integrations in the left-hand menu of your Shopify admin and select 'Signup Forms.' From there, click on 'Create a new Signup Form.' Select 'Klaviyo' as your provider, paste the code you copied from Klaviyo into the HTML box, then click Save.

Why is Klaviyo better for Shopify than Mailchimp?

Klaviyo is a more sophisticated platform than Mailchimp, providing users with detailed insights about their customers and automated workflows to improve the customer experience. Additionally, Klaviyo's social media integrations make it easy to connect your Shopify store with your Facebook Ads account or Twitter campaign.