This article walks through enabling the Shopify integration, syncing your Shopify newsletter subscribers to a list in Klaviyo, and adding web tracking to your Shopify store. After integrating you can optionally sync any of your existing signup forms to your Klaviyo account.
Enable the Shopify Integration
There are three options to get started with Klaviyo’s Shopify integration:
- Add the Klaviyo App from the Shopify App Store
- Add the Shopify integration from the Klaviyo getting started wizard (if you’re a brand new customer)
- Add the Shopify integration from the Integrations tab in your Klaviyo account
All three options redirect you to the Klaviyo app landing page inside your Shopify store. The following instructions cover the third option, adding the Shopify integration from the Integrations tab in your Klaviyo account.
- In your Klaviyo account click the Integrations tab and click on the Shopify integration. This takes you to your Shopify Integration settings page.
- Paste in the URL of your Shopify store and click Connect to Shopify. There are two additional settings:
- Subscribe customers who Accept Marketing to a Klaviyo list
Checking this box automatically adds all customers who accept marketing at your checkout, or sign up to your default Shopify signup form, to the list you select from the dropdown. Read more about syncing your newsletter subscribers below.
- Subscribe customers who Accept Marketing to a Klaviyo list
- After configuring your settings, click Connect to Shopify. This takes you to your Shopify account.
- Click Install App. This begins syncing your Shopify data with Klaviyo and takes you back to your Klaviyo account.
- A green success callout indicates that your data is syncing with Klaviyo. You can view this data at the bottom of the screen.
If you're syncing a large amount of data a green progress bar will indicate the status of your sync. See the section below on Monitoring the Historical Data Sync for more detailed information.
Your Shopify integration is now enabled.
Sync Your Shopify Newsletter Subscribers to a Klaviyo List
It's important to setup your main newsletter list in Klaviyo to automatically add all customers who accept marketing at your checkout, or sign up to your default Shopify signup forms. New newsletter subscribers will be synced through your integration's periodic sync.
Note the following two items:
- You also have the option to use Klaviyo forms or a 3rd party signup form. See the section below on syncing your signup forms to Klaviyo.
- If you're using a 3rd 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">
Navigate to your Shopify integration page by checking the box to Subscribe customers who Accept Marketing to a Klaviyo list, and selecting a list from the dropdown. After you select the list you want to sync, click Update Shopify settings.
When you integrate your Klaviyo account with Shopify, one of the properties synced from your store is whether each customer accepts 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 your Klaviyo account.
To learn more about how the "Accepts Marketing" property is managed in Shopify, view their documentation. This property is always synced to your Klaviyo whether you subscribe customers who accept marketing to a list or not.
It's important to note that the Accepts Marketing property that's synced to Klaviyo doesn't mean someone is or isn't 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 customers checks out and decides not to accept marketing then, but subscribes through a signup form later, they'll still be added your newsletter list.
- If a customer checks out and does accept 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 them not accepting marketing, but you probably don't want to treat not subscribing twice as an unsubscribe. In this case, we'll keep them on your newsletter list.
Add Web Tracking to Your Shopify Store
Klaviyo provides two web tracking snippets to help you collect valuable information about your customers:
- Active on site
- Viewed Product
This snippet tracks when your customers view specific products.
Add web tracking to your Shopify store by pasting Klaviyo's code snippets into your Shopify theme.
- From your Klaviyo account click the Account dropdown and select Setup Web Tracking. This takes you to a page with Klaviyo's web tracking snippets.
- Copy the second snippet.
- From your Shopify Admin click Online Store > Themes. From the dropdown click Edit Code.
- Search for the product.liquid file. Click the file to open it in the editor.
- Paste the second code snippet at the bottom of the file, after all the existing code. Click Save.
For this snippet to work correctly it should be added to all of your product pages. If you are using custom product pages, you may need to add this snippet to a different theme file, or to your individual custom product pages.
- Switch back to your Klaviyo account. Enter the URL for your Shopify store into the box. Click Next.
- Click the link that is generated where you previously input your URL. This triggers an Active on Site event in your Klaviyo account.
A green Data Received button confirms that your web tracking is set up correctly.
Sync Your Shopify Signup Forms or Add Klaviyo Forms
Enabling the Shopify integration provides three options for syncing your signup forms to Klaviyo:
- Sync your default Shopify signup forms to Klaviyo list.
- Add a Klaviyo form to your Shopify store.
- Integrate a 3rd party signup form provider to your Klaviyo account.
Monitoring the Historical Data Sync
Depending on how many orders, customers and products your store has, it can take anywhere from a few minutes to several hours to sync all of your data. Once the initial sync is complete, new data will sync to Klaviyo in real-time. To check the progress of the initial sync, click on the Metrics tab in the sidebar.
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. If you want 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 and check the Contact Information > Organization section.
Here are some quick troubleshooting tips for common issues.
My Shopify Integration is Not Syncing
If you think your Shopify integration is not syncing data properly, you can update the sync by completing the following steps.
- From your Klaviyo account, click into your Integrations tab.
- Find your Shopify integration and click View Settings.
- Click the blue Update Shopify Settings button. If you're not logged into your Shopify store you will be redirected to Shopify and prompted to log in.
When you click to update your integration settings, we will re-authenticate with Shopify and then you will be brought back into Klaviyo. If you click to update, and then click the back button or navigate elsewhere before this authentication process completes, this will cause your integration to get disabled.
- A green Settings Updated callout at the top of the page confirms your integration has been updated and is resyncing. This can take up to 1 minute to appear.