Getting started with Shopify

Last updated at:


Learn how to enable Klaviyo’s Shopify integration in order to bring your customer profile and order data into Klaviyo and reach customers with targeted messaging. This guide walks through collecting email and SMS subscribers, syncing your Shopify newsletter or signup form subscribers to a Klaviyo list, adding metrics from Shopify to Klaviyo, and enabling Klaviyo tracking for customers and their viewed products to your Shopify store. Adding the Shopify integration, and configuring specific settings, will automatically bring all of this data into Klaviyo.

There are two ways to get started with Klaviyo’s Shopify integration:

  • Add the Shopify integration from the Klaviyo Setup Wizard (if you’re a brand new customer)
  • Add the Shopify integration from the Integrations tab in Klaviyo 

The following instructions walk through adding the Shopify integration from the Integrations tab in your Klaviyo account.

Integration Video

Adding the Shopify Integration

In Klaviyo, select your account name in the lower left. Then, click Integrations. Search for Shopify, then click Add Integration to view the integration settings page.

Shopify’s listing on Klaviyo’s integrations page, with Add Integration

Shopify Settings

Here, we detail how to configure your Shopify settings in Klaviyo before connecting your account. If you ever need to update these settings, you can return to the integration settings page, make changes, and then click Update Settings.

Klaviyo's Shopify integration page, showing Connection Details, Onsite Tracking, Subscriptions, and Advanced

Store URL

Paste the URL of your Shopify store in the box. Make sure that it is in the format

Onsite Tracking

The Klaviyo app embed for the Shopify Theme Editor enables Klaviyo onsite tracking for both vintage and Shopify 2.0 themes. After integrating with Shopify and installing the Klaviyo app, toggle on the Klaviyo app embed for your store by following the instructions in the section below. 

There are two key types of Klaviyo onsite tracking: Active on Site and Viewed Product tracking. Using these tracking events can help you engage identifiable browsers of your store. Additionally, enabling Active on Site tracking will allow you to use Klaviyo signup forms. 

Make sure the Viewed Product setting is checked. This will enable Viewed Product tracking for your store once the app embed is toggled on. 

If you previously integrated with Shopify before the release of the app embed on April 19, 2022, Klaviyo still encourages you to install it. To learn more about Klaviyo onsite tracking and the Shopify app embed, read our article on Klaviyo onsite tracking for Shopify. Note that the app embed for your Klaviyo account can only be associated with one Shopify store. 

Email Subscribers

Check the Collect email subscribers box to automatically add all customers who accept email marketing at checkout and then complete a purchase, or sign up to your default Shopify signup form, to the list you select from the dropdown. It's important to add your Shopify subscribers automatically to your Klaviyo newsletter list in order to easily build a list of consented subscribers to send to. New newsletter subscribers will sync in real time through your Shopify integration. 

Whether or not a customer is subscribed to your newsletter does not directly correlate with Shopify’s Accepts Marketing property, which syncs to Klaviyo. In certain situations, someone may have Accepts Marketing set to false, but still be subscribed to your newsletter. These customers can still be emailed; for more information, read below about the accepts marketing property.

It is also important to note that if you use a Shopify third party theme, your theme's default signup forms must also apply the Newsletter tag to new subscribers in order for Klaviyo to automatically sync these subscribers to a Klaviyo list. Contact your theme developer, or if you're comfortable editing your theme's source code, add the following hidden input tag to your form's input group: <input type="hidden" name="contact[tags]" value="newsletter">

SMS Subscribers

Check the Collect SMS subscribers box to automatically add all customers who accept SMS marketing at checkout to the list you select from the dropdown. Collecting SMS consent from customers during checkout allows you to drastically grow your SMS subscriber list. It is also a straightforward, non-intrusive way to gain consent. You will only be able to collect SMS consent from recipients in countries where Klaviyo SMS is available.

If you are also collecting email subscribers, assign a separate list to each channel. This ensures that consent is applied properly when subscribers sync into Klaviyo. For more information, read How to Collect SMS Consent at Checkout on Shopify

Note that consent will only sync to Klaviyo if the person is subscribing to SMS in Shopify for the first time.

Customer SMS Status

While not required, we recommend checking the box Sync Customer SMS Subscription Status to Shopify. This setting will automatically backfill your SMS subscription data to Shopify and, in the future, sync this data from Klaviyo to Shopify whenever a Shopify customer subscribes or unsubscribes from SMS.

Advanced: Update Shopify Customer Profiles with Klaviyo Data

This option will sync certain fields like first name, last name, accepts marketing (email), and more from Klaviyo to Shopify. Only select this option if you would like the Klaviyo values to overwrite the corresponding Shopify values. Read more about syncing Klaviyo data to Shopify.

For existing profiles in Klaviyo, we will start syncing those fields to Shopify the next time Shopify syncs any data about them to Klaviyo. This is because, for existing profiles, we need their Shopify ID in order to update their information in Shopify. Profiles that don't exist in Shopify but do exist in Klaviyo will not be synced back as a net-new profile. They will still need to perform an activity in your Shopify store that adds them to your Shopify account before Klaviyo will start syncing data.

After configuring your settings, click Connect to Shopify. This will take you to your Shopify account.

Installing the Klaviyo App in Shopify

After being brought into Shopify, review the permissions and click Install app. This begins syncing your Shopify data with Klaviyo and takes you back into your Klaviyo account.

Klaviyo app permissions page within Shopify

A green success callout will indicate that your data is syncing with Klaviyo.

When your sync finishes depends on the amount of data; see the section below on Monitoring the Historical Data Sync for more detailed information.

Finally, enable onsite tracking by toggling on the Klaviyo app embed in Shopify. Do this by navigating back to the integration settings page in Klaviyo, where you’ll see a message noting that your Klaviyo app embed is not yet enabled. 

Click the link labeled view your App Embed setting here to be brought into Shopify. 

Shopify onsite tracking settings in Klaviyo showing callout with yellow background reading The Klaviyo App Embed is not enabled

Note that the setting to enable Viewed Product is checked by default, so Viewed Product will start tracking once you enable the app embed. 

After being brought to your theme settings, make sure the app embed is toggled on and then click Save.


To check that your onsite tracking setup is complete, navigate back to your Shopify integration settings page in Klaviyo, where you’ll see a blue callout stating that your app embed is now enabled. 

You’ve now integrated Klaviyo with Shopify and set up onsite tracking. 

Shopify onsite tracking settings in Klaviyo showing callout with green background reading The Klaviyo App Embed is enabled on your Shopify store, and Viewed Product checked

How to Test Onsite Tracking

To test that your Active on Site and Viewed Product web tracking are working, follow these steps:

  1. Navigate to your Shopify site
  2. On your homepage, add the following to the end of the URL, replacing with your email address:
  3. Reload the page
  4. Navigate to a product page on your site
  5. Search in Klaviyo for your email address

You will see that a Klaviyo profile has been created for you (if one didn't exist already), and that this product view has been tracked on your activity feed.

Monitoring the Historical Metric Sync

When you first integrate with Shopify, Klaviyo will sync the last 90 days of your Shopify data so you can start engaging your most recent customers. After the sync of the last 90 days of data, Klaviyo will begin your complete historical data sync. Depending on how many orders, customers, and products your store has, it can take anywhere from a few minutes to several days to sync all of your data, and a green progress bar will show the progress of your sync.

Once this historical sync is complete, new data will sync to Klaviyo in real time. To check the progress of the initial sync, click the Analytics dropdown and select Metrics. Find the Placed Order metric and change the date range of the graph to see which dates have been fully synced. When the sync is complete, the Shopify integration in the Integrations tab will be marked complete. To verify for yourself that all data from Shopify is synced, you can cross check the total orders for a few days or a week. Before you start validating, make sure your account's timezone matches the settings in Shopify.

To check or update your account's timezone, go to the Account Settings page (found by clicking your account name in the lower left, then clicking Settings) navigate to Contact Information > Organization and scroll down to Timezone.

Klaviyo limits the number of unique metrics you can create to 200. When you approach this threshold, you will be alerted via a warning in your account, along with an email to the account owner.

About Signup Forms with Shopify

Klaviyo’s Shopify integration provides three options for syncing your signup forms to Klaviyo:

If you checked the box to automatically add Klaviyo onsite JavaScript (recommended) on your Shopify Integration settings page, or followed the guide to do so manually, then you have already installed klaviyo.js and your Klaviyo forms are enabled. You can jump right to the signup form editor, found in the Signup Forms tab, and start building out a form.

About the Accepts Marketing Property

When you integrate your Klaviyo account with Shopify, one of the properties synced from your store is whether each customer accepts email marketing or not. The property can be either true or false. Below is an example of how the property appears on a customer's profile in Klaviyo. To find a list of profiles in Klaviyo and view their details, click the Audience dropdown and select the Profiles tab. You can also use the search bar to search for individual profiles. 

Klaviyo’s profile property information, with First Active, Last Active, Custom Properties, Accepts Marketing, Profile Created, and Profile Updated

To learn more about how the Accepts Marketing property is managed in Shopify, view their documentation. This property always syncs to Klaviyo, but is set by Shopify, and so it might not always match whether a customer is subscribed to your newsletter.

There are a few situations which can cause someone to have Accepts Marketing set to false, but they're still subscribed to your newsletter:

  • If a customer checks out and decides not to accept email marketing at that time, but later subscribes through a signup form, they'll still be added to your newsletter list.
  • If a customer checks out and does accept email marketing, they'll be added to your newsletter list. If they check out again, they'll probably decide to not subscribe again since they're already subscribed. Depending on your checkout configuration, Shopify might see this as not accepting marketing (Accepts Marketing = false.) You probably don't want to treat this customer as an unsubscribe. Rather, you'll want to keep this customer on your newsletter list. 

Klaviyo will not automatically sync historical subscribers to a list when a customer checks Subscribe new customers to a Klaviyo list. If you need to add historical subscribers to your newsletter list, you can do so with property and flow editing as outlined in How to Add or Combine Lists Without Triggering a Flow. You can also add subscribers to a list manually by following How to Add Subscribers to an Existing List

If you want to learn more about the integration setting Update Shopify profiles with Klaviyo data, and under what circumstances the Accepts Marketing property syncs back to Shopify when that setting is checked, read our article on how to sync fields from Klaviyo to Shopify

Additionally, it's important to note that a customer who has Accepts Marketing set to false won't automatically be suppressed. To learn more about suppression, check out our article About Suppressed Profiles in Klaviyo


If you are having trouble with your Shopify integration, check out our article Troubleshooting Your Shopify Integration

Additional Resources

Was this article helpful?
2384 out of 3678 found this helpful