Elmail Experts logo
ExpertiseBigCommerce Email MarketingEmail AutomationKlaviyo ExpertsShopify Email Marketing
About usCase studiesExpert opinionsContact
< Back

Jun 13, 2022

How to Integrate Klaviyo with Shopify

By Shaun Ernst

Set up the core components of the integration between Klaviyo and Shopify (or Shopify Plus) to collect subscribers and set up the technology to better understand, segment, and reach your customers. We will show you how to connect Klaviyo and Shopify through the backend, add web tracking on the front end, collect subscribers at the checkout and website forms, and how to collect SMS Subscribers.

This video goes step-by-step through the process with a screen recording to follow along.

Connect to Shopify when setting up a new Klaviyo account

If your don't have a Klaviyo account, follow this part, if you already have a Klaviyo account, skip to the "Connect to Shopify from an existing Klaviyo account" section of this blog.

To start with, have three tabs open and ready to move between;

To start the connection process, head to the Klaviyo homepage. Click “Sign up” in the top right corner.

Klaviyo homepage, press the Sign Up button

Fill out your details for the account. Once all relevant company information is given, click “Create account” at the end of the page.

Klaviyo signup page, fill out Company Name, Company Website, Phone Number and click Create account

Once you have created the account, you will see a menu with options to connect shop accounts. Select Shopify from the menu. This will then prompt you to paste your Shopify URL; copy your Shopify URL from your Shopify account, and past it into Klaviyo.

Connect to Shopify Page, click Continue

Klaviyo will now direct you to the Shopify backend and prompt you to install the Shopify App for Klaviyo. Click “Install app” in the top right.

Shopify backend, click Install app

Once the app is installed, it will bring you back to Klaviyo to continue the account set-up. Continue the rest of the account set-up until you reach the “How do you want to reach your audience?” page.

On this page you will be asked what platforms you want to reach your audience through. In this blog we will teach you how to set up both SMS and Email, so we will select both Email and SMS.

*Note that as of this blog's release, Klaviyo SMS is only supported in USA, Canada, UK, Australia, and New Zealand.

Klaviyo signup page, reach your audience through Email and SMS

The account is now set up. Confirm your email address and then log in to your account. Once you are logged in, you need to confirm that Shopify is connected. From the Klaviyo homepage click on “Integrations” on the left hand menu, or go here.

Klaviyo Homepage, click integration on the left hand menu

Click on Enabled Integrations and Shopify should be listed. Click on Shopify.

Klaviyo Integrations, click Shopify

This is the basics of integrations complete. Keep the Shopify Integrations page open as we will be returning to it later.

This part of the guide is for if you have a Klaviyo account but haven't connected it to Shopify yet. If you've already connected to Shopify, skip ahead to "Setting up Lists in Klaviyo".

When you're signed in with your existing Klaviyo account. Click on “Integrations” within the left-hand menu.

Klaviyo Homepage, click integration on the left hand menu

Find “Shopify” in the list of all integration. You can scroll, search, or find it in the “eCommerce” dropdown.

Klaviyo Integrations, click on Shopify from the list

At the top of the page, paste in the myshopify version of your Shopify URL.

Klaviyo Integrations, paste in your myshopify URL

At the bottom of the page click “Connect to Shopify”.

Klaviyo Integrations, click Connect to Shopify at the bottom of the page

Klaviyo will now direct you to the Shopify backend and prompt you to install the Shopify App for Klaviyo. Click “Install app” in the top right.

Shopify backend, click Install app

This will take you back to Klaviyo to confirm. Click “Integrate”.

Shopify backend, click Install app

Setting up Lists in Klaviyo

When you create a Klaviyo account, Klaviyo will create pre-set lists. We need to make some changes to them. From your Klaviyo homepage, click “Lists & Segments”.

Klaviyo Homepage, click Lists and Segments on the left hand menu

This will bring up the Lists & Segments page, under the middle dropdown menu, filter for “Lists”.

Klaviyo Lists and Segments, filter for Lists

This will bring up two pre-set lists, “Newsletter” and “Preview List”. We are going to rename these lists and change the settings for them. Click on “Preview List”, then click on “Settings”.

Klaviyo Lists, once you preview a list, click on Settings

Change the name of the list from “Preview List” to “Website Signups”.

Klaviyo List Settings, rename list to Website Signups

Scroll down to Opt-in Process and change Double opt-in to Single opt-in.

Klaviyo List Settings, change Double opt-in to Single opt-in

Click “Update List Settings” at the bottom of the page.

Klaviyo List Settings, click update list settings

Now that the Website Signups list is complete, you want to do the same for Newsletter. Change its name to “Checkout Signups”, change Double opt-in to Single opt-in and click update list settings.

If you are using Klaviyo SMS, you need to create a new third list for SMS subscribers. Click “Create List / Segment” in the top right.

Klaviyo Lists, click Create List / Segment at the top right of the page

Name the list “SMS Subscribers” and click “ Create List”.

Klaviyo create new list, rename list to SMS Subscribers

Go to the settings for this new list and change Double opt-in to Single opt-in and click update list settings.

We now have our three Klaviyo lists.

  1. SMS Subscribers will hold all of the subscribers who opt-in to receive text messages

  2. Website Signups for those who join on website forms

  3. Checkout Signups for those who join at the checkout

If you are concerned about duplicate subscribers, Klaviyo does a great job handling them as you will see later in this tutorial. Unlike on other platforms like MailChimp, if a customer subscribes to receive SMS, and email on a website form, and at the checkout, they will have one single unified profile with all three lists.

Connection Klaviyo lists to your Website

Now that we have our lists, we need to connect them to our website. First let's do the checkout.

We will start by connecting the checkout. Return to the Shopify integration settings.

From the Klaviyo homepage, this is under “Integrations” then select Shopify.

Scroll down to Email Subscribers and check the box for “Collect email subscribers”. This will bring up a dropdown menu, select “Checkout signups”.

Klaviyo Integrations, Shopify, Check box to collect email subscribers, select Checkout Signups list

Subscribers will be added to the “Checkout Signups'' List when they check the box at your store checkout to receive email marketing messages from you, like this:

Checkout example, when the checkbox is ticked user will receive email notifications

Back on your Shopify Integration page, click “Update Settings” in the bottom right of the page. Then select “Update Integration”.

Klaviyo Integrations, Please confirm updating this integration, click Update Integration

Now we will connect the SMS Subscriber list to Shopify.
*A reminder that Klaviyo SMS is only available to customers in the USA, Canada, UK, Australia and New Zealand as of release.

Head to your Klaviyo page, and click on your brand name in the top right. Within the dropdown that appears, click “Account”.

Klaviyo Homepage, click on brand name, then account

Click “Setting”, then “SMS”, and then select the option “Set up SMS for free”.

Klaviyo account settings, settings, SMS, Enable personalized SMS to maximize revenue, click Set up SMS for free

Within the popup that appears, it will mention that there are prohibited industries, including the “SHAFT” industries; Sex, Hate, Alcohol, Firearms, and Tobacco. This is related to the US and Canadian regulations on SMS marketing. If you want to learn more details about SMS for Klaviyo check out our video that goes step-by-step through setting up your Klaviyo SMS account.

Getting Started with Klaviyo SMS

Click “Continue” on the popup. You now have a Klaviyo sending number. For US and Canadian customers, your messages will appear to come from the sending number that appears. For UK and Australian customers, you need to set up a message sender ID, this is a name that text messages will appear to come, within these customers inbox. Click on the dot menu on the right and select “Edit”.

Klaviyo SMS setup, click Edit sender ID set

Type in an 11 character string. If your brand name is longer than 11 characters, you will need to shorten it down. Click “Activate” when complete.

Klaviyo SMS setup, Edit Alphanumeric Sender ID, click Activate

Now you are ready to collect phone numbers in Shopify. Within Klaviyo, return to the Shopify integrations page. Scroll down to SMS Subscriber. Check the box to sync SMS customers to Klaviyo. In the dropdown that appears, and choose the “SMS Subscribers” lists.

Klaviyo integrations, Shopify page, SMS Subscriber check Collect SMS subscribers

Click “Update Settings” in the bottom right, and click “Update Integration”.

Klaviyo integration, Please confirm updating this integration, click Update Integration

Return to your Shopify home page. Click on “Setting” in the bottom left of the page.

Klaviyo homepage, click Settings in the bottom left

Find and click on “Checkout” within the menu on the left, scroll down to “Consent for marketing” and select “SMS Marketing”. This will prompt you to set up a terms of service and privacy policy, make sure your setting are set up to accurately communicate to your customers about how you handle their phone numbers and what you will use them for.

Klaviyo settings, checkout, consent for marketing,  check SMS marketing box

Click “Save” in the top right of the page.

This has now added a checkbox to your stores checkout that will alow customers to opt in to SMS marketing. When they do, their phone number will be added to their profile and added to the “SMS Subscribers” list.

Aha example

You have now synced your Klaviyo lists with your Shopify stores, for both Email and SMS.

Track Browsing Behavior

First, to add web tracking, in your Klaviyo account, click your brand name, and choose “Setup web tracking” from the dropdown.

Klaviyo homepage, click brand name and Setup Web Tracking

If you have used this tool before April 2022, Klaviyo has since updated their web tracking tool to make it easier to use.

In this new settings page, click “View your Shopify App Embed settings”. This will take you to your Shopify theme files.

Klaviyo Web Tracking, Integrate Klaviyo on your Shopify website, click View your Shopify App Embed settings

You will see in the left panel that the Klaviyo Javascript has been added. Click save and this component is done.

Shopify App, within Theme setting menu Klaviyo Onsite Javascript should be enabled

That's it, now web tracking is on your website. If it's not working, it will be because of your theme settings, reach out to your theme developer about adding Klaviyo tracking to your theme.

Design and Install a Klaviyo Signup Form

Within your Klaviyo homepage, in the left column, select “Signup forms”, or click here.

Klaviyo homepage, click Signup Forms on left menu

Klaviyo has a gallery of form designs. They are great starting points, and are highly customisable. We will just cover the basics here. Select “Collect Emails” and “Collect Phone Numbers”, and in the dropdown menu on the left, select “Embed” form.

Klaviyo Signup Forms, browse templates, select Embed from the dropdown menu on the left

Select the first basic form design that appears. We are going to make some minor edits to the design and copy.

Klaviyo Signup Forms, browse templates, Coupon code at checkout template

For the “Email subscriber list” dropdown menu, choose “Website Signups” List. Rename the form to where it will be used within your site, and click “Create Form”.

Klaviyo Signup Forms, browse templates, Select Website Signups from dropdown menu Email subscriber list

If you want to see an example of form customization, check out the video embedded at the start of this blog from timestamp 8:36.

On the Email Opt-In page, link the button to the correct list. Click on the “Reveal coupon” button, and within the “List to Submit” dropdown menu, select “Website Signups”.

Klaviyo form customization, within button settings, select Website Signups for List to Submit

Add a second page that collects SMS consent. Under the “SMS Subscribe List” select “SMS Subscribers”.

Klaviyo form customization, Add Step, SMS Opt-in, select SMS Subscribers for SNS Subscribe List

Add your company name and the links to your terms and conditions, privecy and, and terms of service to the SMS consent page.

Klaviyo form customization, SMS consent page, add brand name and link privacy policy

Set the default country wherever you expect to receive the most customers from.

Change the form text, design, and copy to your liking, and add a Success page to the end of your form. Once you are done, we need to add the form to your website. Click “Publish” in the top right corner.

Klaviyo form customization, click Publish in the top right

A popup will appear, giving you an Embed Code, you don’t need this, you just need to copy the 6-digit unique code, which is also in the URL when editing the form. Then click publish again.

Klaviyo form customization, see 6-digit code in URL

To add this form to your website, return to your Shopify homepage. Click on “Online Store” on the left hand menu, and click “Themes”

Shopify homepage, Sales channels, select Themes

Within the theme settings, click “Customize”.

Shopify Themes Page, click Customize

This will bring up the editor. At the top of the screen you can control which page you want to add the form to, in my example, I add it to the “home page”:

Shopify Page Editor, select Home Page from dropout at the center of the website

On the left panel, click “add section”, scroll down to “Apps” and you can select “Klaviyo embed form”.

Shopify Page Editor, select Klaviyo Embedded Form app

Move the embed form where you want your customers to see it within your website. Then click on the Klaviyo Embedded Form, here you need to add the form ID. This is the 6-digit code from the URL earlier.

Shopify Page Editor, Klaviyo Embedded Form, paste URL code

Now the form will show on your website. Click “Save” in the top right, and now it’s live on your site.

Shopify Page Editor, click Save in the top right

Check Customer Data

At this point, you want to make sure all the customer tracking tools you have set up are working as intended. First, go to your live website, and sign up using the form you have just created. In this example we are using test@bob.com, and a placeholder phone number.

Go to your live company website, use popup to test email using dummy email address

Go to your Klaviyo homepage, and click on “Profiles” in the menu on the left. You should see your placeholder email has a profiled created within Klaviyo.

Klaviyo Profiles, check to see if dummy email has been added

Clicking on this profile should bring up their behavior on the site, make sure all stages of the signup were completed, and they were added to the correct lists.

Klaviyo Profile, dummy email activity, check it has been added to the correct lists on right

We will now test the web browsing tracking, back on the website, view a product page within your site. Then return to Klaviyo and refresh your example profile. You should see the data has been fed in and you can see the browse behavior.

Klaviyo Profile, dummy email activity, check viewed product action

Finally, start a checkout within your store, sign up for SMS within the checkout, and progress through all the steps of your checkout. Return to and refresh the profile page, and see all of this checkout behavior coming through to Klaviyo.

Klaviyo Profile, dummy email activity, check started checkout action

That's it. Now your Shopify website will be sending signups to your Klaviyo account, you can track their browing behviour, and you have everything you need set up to start setting up your flow automations and campaigns.

Learn more Email Marketing Automation tips from Email Experts
For more information about Klaviyo marketing, check out our other blogs in this series and the videos that go with them.

How to Create Lists and Segments in Klaviyo

How to Design An Effective Email Template With Klaviyo and Canva

Check out our YouTube channel, where we have tutorials on how to build up your email marketing. Please subscribe to be notified when future content is released.

Author: Shaun is the Founder of Email Experts. Combining his love of data analysis and his passion for marketing, Shaun enjoys working with marketing professionals to deliver excellent results for ecommerce businesses.