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, and enabling Klaviyo tracking for customers and their viewed products to your Shopify store.
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.
Adding the Shopify Integration
In Klaviyo, navigate to the Integrations tab and search for Shopify. Then, click Add Integration to view the integration settings page.
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.
Paste the URL of your Shopify store in the box. Make sure that it is in the format mystore.myshopify.com.
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.
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">
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.
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, email marketing, 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.
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.
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.
How to Test Onsite Tracking
To test that your Active on Site and Viewed Product web tracking are working, follow these steps:
- Navigate to your Shopify site
- On your homepage, add the following to the end of the URL, replacing email@example.com with your email address:
- Reload the page
- Navigate to a product page on your site
- 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 Data 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, navigate to the Analytics tab and then click into 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 dropdown, then clicking Account) and check the Contact Information > Organization section.
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:
- Sync your default Shopify signup forms to a Klaviyo list
- Add a Klaviyo form to your Shopify store
- Integrate a 3rd party signup form provider to your Klaviyo account.
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, navigate to the Profiles tab. You can also use the search bar at the top of your dashboard to search for individual profiles.
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.
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.
- Want to learn about enabling key flows for your Shopify store?
- Abandoned "Added to Cart" Flow: Guide to Creating an "Added to Cart" Event for Shopify
- Back in Stock Flow: How to Install Back in Stock for Shopify
- Want to learn about sending notification emails?
- If you want to send notification emails via Shopify: How to Personalize and Export Shopify Notification Emails
- If you no longer want to send notification emails via Shopify: How to Disable Notification Emails Sent by Shopify
- If you want to send notification emails via Klaviyo: Guide to Using Flows to Send Transactional Emails
- Want to learn about coupons for Shopify?
- Want to learn about how email subscribers sync to Klaviyo?
- Want to learn about data synced between Shopify and Klaviyo?