You will learn
Learn how to collect SMS consent at checkout on Shopify by updating your Shopify integration settings and then adding a consent checkbox in Shopify. One of the quickest and easiest ways to grow your SMS list is by collecting consent at checkout. With Klaviyo’s integration with Shopify, you can leverage this approach and reach a wider audience with your SMS marketing.
Before you begin
You can only collect SMS consent in locations where Klaviyo SMS is available. You also must have a sending number for the location where you're collecting consent.
Before you begin gathering SMS consent at checkout, you need to:
- Set up SMS in Klaviyo.
- Update your terms of service and privacy policy.
- Integrate your Shopify store with Klaviyo.
Remove code snippet from Shopify's checkout.liquid file
This section only applies if you previously added a code snippet to the checkout.liquid file to set up consent at checkout.
If you never set up consent at checkout for Shopify, skip to the next section.
- In Shopify, navigate to Themes > Actions > Edit Code.
- Click into checkout.liquid on the left.
- Search for "Klaviyo" to locate the correct code snippet, as it can be located anywhere in this page. For our example, it is located at the very bottom and appears as:
<script async type="text/javascript" src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=WUJLSH&module=CONSENT_AT_CHECKOUT"></script>
- Click Save.
In Klaviyo: update your Shopify integration settings
The first step to collecting SMS consent at checkout with Shopify is changing your integration settings.
- Click your account name in the bottom left.
- Select Integrations.
- Select Shopify from the list of enabled integrations.
- Under Sync data from Shopify, check the box Sync your Shopify SMS subscribers to Klaviyo.
- Select the list you want to add your SMS subscribers to. If you are also collecting email subscribers, assign a separate list to each channel, so that consent will get applied properly when subscribers sync into Klaviyo.
- Recommended: under Sync data to Shopify, select All profiles and SMS subscription status. We also recommend checking Name, email address, and phone number and Email subscription status, if you have not done so already.
- If you choose the SMS subscription status option (and you choose to sync all profiles) a backfill of all SMS subscription statuses and associated phone numbers will occur after you integrate to ensure Klaviyo and Shopify are in sync.
- Click Update Settings, which will bring you to your Shopify store.
- Review the changes and click Update App.
In Shopify: Add SMS consent collection to checkout
The next step is adding SMS consent collection at checkout in Shopify.
- In your Shopify admin, click Settings at the bottom of the left sidebar.
- On the Settings page, click Checkout.
- In the Marketing Consent Show an option to subscribe at checkout for SMS marketing.
- Scroll down to the bottom of the page and click Save.
Outcome
Your checkout page will now have a section similar to the one shown below.
Now, consent will now start syncing to Klaviyo when someone does all of the following steps:
- Enters their phone number.
- Selects the checkbox to accept SMS marketing.
- Clicks Continue to shipping.
If the list is set to double opt-in, which is strongly recommended, customers will have to confirm their subscription before SMS consent is added in Klaviyo. The only exception is when you're using a branded sender ID, which always uses a single opt-in approach since it can't receive messages.
The customer do not need to complete their order to have their consent synced to Klaviyo. Thus, you can more easily and quickly grow your SMS list.
If you already have SMS subscribers in Shopify, you can export them into a CSV file and then import them into Klaviyo.
Additional resources
- Take this course on writing SMS and MMS copy
- Learn the basics of using SMS and email together