How to Integrate Klaviyo with Shopify

Joseph Hsieh

November 29, 2019

You created your Shopify store and now you want to utilize the Email Marketing. To do this, you need a Klaviyo Account which you will integrate with your Shopify Store. If you don’t have Klaviyo account yet, you can click here to get started.

In this guide we will cover the process of integrating Shopify with an existing Klaviyo account and the process of creating a new Klaviyo Account and using the “Klaviyo Getting Started Wizard” to connect it to your Shopify store.

  1. Klaviyo Getting Started Wizard: If you’re just creating your Klaviyo Account you can connect it with Shopify using the Klaviyo getting started wizard.
  2. Klaviyo’s Integrations Tab: Connect Klaviyo and Shopify from the “Integrations” tab in Klaviyo.

Initiating the Integration

Klaviyo Getting Started Wizard

This method is for people that don’t have Klaviyo account yet. This link will redirect you to the Klaviyo website where you should see a sign up form from where you can create your Klaviyo Account.

Fill in the sign up form and click on “Getting Started”.

Fill in the sign up form and click on “Getting Started”

The Klaviyo Getting Started Wizard will drive you through the basic settings you need to apply for your new Klaviyo Account. One of those settings is the integration with your Shopify store.

Basic settings of Klaviyo Getting Started Wizard

Enter your website address, select your business type and the platform you’re using (in this case Shopify), and click “Continue”

In the next step you need to enter the URL of your website and click “Connect Shopify account.”

Note: You can find your “” URL from Shopify by looking at the URL when you log into Shopify or from Online Store -> Domains page under the section “Shopify-managed Domain”:

Copy the URL of your Shopify store

Go back to Klaviyo, enter the URL and click “Connect Shopify Account”

Go back to Klaviyo, enter the URL and click “Connect Shopify Account”

You will be redirected to Shopify to confirm the integration. After you finish this step, you should be brought back in Klaviyo and see a confirmation that the integration is successful.

After you finish all the settings from the Getting Started Wizard and you log into your Klaviyo Account, you can go in the “Integrations” tab and under “Enabled Integrations” you should see the Shopify Integration.

In the “Integrations” tab and under “Enabled Integrations” you should see the Shopify Integration

If you click on the “View Settings” for your Shopify integration, you can see and change additional settings that are important for this integration. These settings are described with more details in the next part of this tutorial.

Klaviyo’s Integration Tab

This is the method of integrating Shopify through the Klaviyo’s Integrations Tab. You can find this section in Klaviyo’s sidebar.

Klaviyo’s Integration Tab

In the “Integrations” section you can see two tabs, “All Integrations” and “Enabled Integrations”. The “Enabled Integrations” tab is for integrations that are already installed in Klaviyo. The “All Integrations” tab contains all the apps you can integrate with Klaviyo.

In the search bar of the “All Integrations” tab write “Shopify” and when you find the app, click on “Add Integration” to initiate the integration with your Shopify store.

On the next page there are few settings you need to apply before you connect your Shopify store.

Shopify Integration Settings

Integration Settings:

Shop URL: As shown in the image above, in this field you should place the URL of your store. You can find the URL by logging into your Shopify store.

Subscribe customers who Accept Marketing to a Klaviyo list: Be sure to enable this option. This is for the people that Place Order, Initiate Checkout or subscribe to any Shopify built opt-in form. When they do one of these things, their email will be captured and will be placed into a List of your choice in Klaviyo.

Note that this is only for people who Accept Marketing. If they choose the option not to receive emails from you, they won’t be placed into any Klaviyo List and you can only access them from the “Profiles” tab. They will still exist as profile in Klaviyo, with a property “Accept Marketing = False” and they will be eligible for receiving transactional emails.

Automatically add Klaviyo onsite javascript (recommended): Enabling this option is highly recommended. This will automatically install all the necessary scripts in your store to allow web tracking, onsite forms and other Klaviyo features.  Disable this only if you are integrating Klaviyo manually within the Shopify Theme code directly which requires a web developer to implement.

Update Shopify profiles with Klaviyo data: Enabling this option will allow the integration to take information about subscribers from Klaviyo and update that information for existing subscribers in Shopify. Choosing whether to enable or disable this option is based on the recency of information you have about your subscribers in Klaviyo. If the information you have in Klaviyo is more recent that the one in Shopify, you can enable this option.

After setting these options click on the “Connect to Shopify” button and confirm that you want to integrate from the next pop-up from Shopify.  Note, it’s typically a good idea to log into Shopify with the Shopify Owner’s account instead of a Shopify Staff Member account to avoid integration issues with permissions in the future should a Staff Members’ access change or leave your organization.

If everything is set correctly so far, you’ll be redirected to Shopify to confirm the integration. You should see a page containing the basic information about the integration.

Click “Install App” to proceed.

Click “Install App” to proceed

If everything is done correctly, you should be redirected back to Klaviyo and see the confirmation that the integration is successfully created. You should see this confirmation block in your integration page.

Confirmation of successful integration

Klaviyo will start synchronizing data with Shopify and depending on how much data is currently stored in your Shopify, the synchronization can take anywhere from a couple of minutes for new stores to a couple of hours (or even days) for large Shopify merchants with a lot of historical data.

Understanding Shopify Metrics

With every integration, a certain metrics are created in Klaviyo to which the data will be passed from the integrated app to Klaviyo. You can find them all in the “Metrics” tab and from the top right corner you can select to see only the metrics from certain integration. In this case, we’ll review the metrics created from Shopify.

Shopify Metrics in Klaviyo

These metrics are being updated in real time and they can be used for creating Flows or advanced Segments.

For each of them you can see:

1. Charts

Analytics tab that keeps track of events over time. You can select a time frame, show by day, week or month, show filtered data for certain products or other parameters.

2. Activity Feed

This section shows real time events. If a visitor were to trigger an event, like initiating a checkout, you should see  that event in the “Activity Feed” of the “Checkout Started” metric in real time. Depending on the metric, you may see additional data of the metric such as products in the cart, properties of the event, etc.

3. Cohorts

In this section you can see month over month progress grouped by the month of the user for that metric over time. You can also select from various pre-made reports from a dropdown to visualize the data with different criteria.

4. Best People

Klaviyo’s algorithm ranks people based on their historic behavior and it will create a list with the best people for each metric by the number of totaled events measured or the value they produced.

5. Activity Map

On the Activity Map you can see the events for each metric occur on a world map that allows you to zoom in or out from certain regions.. You have the option to track events in Real Time, Last Day, Last Week or Last Month.

Implementing the “Active on Site” and “Viewed Product” Metric for Shopify

There are 2 more important metrics that comes with this integration that are not labeled as “Shopify” metrics but as custom APIs. Those are the:

1. Active on Site

If you have enabled the “Automatically add Klaviyo onsite javascript option during the integration process with Shopify, this metric will automatically become active after the successful integration. This will track the activity of your existing subscribers whenever they visit your website.

2. Viewed Product

This metric also track the behavior of your subscribers when they visit your website, but on a product level. It will track which products subscribers visit when they browse your website. If you want to enable this metric, you’ll have to manually install the tracking code in your Shopify Theme.

To install the code for Viewed Product metric, go to the top right corner in your Klaviyo Account and from the dropdown menu select “Setup Web Tracking”

Go to the top right corner in your Klaviyo Account and from the dropdown menu select “Setup Web Tracking”

Copy the automatically generated code.

Copy the automatically generated code

Navigate to your code section of your Shopify store

Navigate to your code section of your Shopify Store

Find the product.liquid template and at the end of the existing code, paste the code from Klaviyo and click Save.

Find the product.liquid template and at the end of the existing code, paste the code from Klaviyo and click Save

After doing this step, go back to Klaviyo and enter the URL of your Shopify store in the empty field and click “Next”.

Go back to Klaviyo and enter the URL of your Shopify store in the empty field and click “Next”.

If everything is set correctly you should see the gray button “Waiting for data…” button change into a green button that says “Data Received. Continue”

Confirmation for successful code implementation

This means that you’ve added the Viewed Product code successfully and Klaviyo will start tracking the events of the “Viewed Product” metric.

As we mentioned before, all these metrics can be used to create a variety of Flows we will be going into more depth:

  1. Abandoned Cart
  2. Post Purchase
  3. Browse Abandonment
  4. Win-back
  5. Post Cancellation
  6. Fulfillment Confirmation

Recent Posts

How to Disable or Enable the Double Opt-in Process in Klaviyo

What is "Double Opt-in" and how to disable it in Klaviyo.

How to A/B Test the Sending Time of Campaigns in Klaviyo

Learn how to A/B test the sending time of campaigns in Klaviyo.

How to A/B Test Subject Line and Content in Campaign Emails in Klaviyo

Learn how to A/B test your campaigns in Klaviyo.