How to collect SMS consent at checkout on Shopify

Estimated 3 minute read
|
Updated Oct 10, 2024, 12:27 PM EST
You will learn

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

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:

Remove code snippet from Shopify's checkout.liquid file

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. 

Instructions for removing the code snippet
  1. In Shopify, navigate to Themes > Actions > Edit Code
    Shopify home page when the Actions dropdown is open
  2. Click into checkout.liquid on the left.
  3. 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=PUBLIC_API_KEY&module=CONSENT_AT_CHECKOUT"></script>
  4. Click Save
In Klaviyo: update your Shopify integration settings

In Klaviyo: update your Shopify integration settings

The first step to collecting SMS consent at checkout with Shopify is changing your integration settings.

  1. Click your account name in the bottom left.
  2. Select Integrations, then select Shopify.
  3. Scroll to Sync settings. 
    CaC_SMS_consent_1.jpg
  4. In the From Shopify tab, check the box Sync your Shopify SMS subscribers to Klaviyo.
  5. 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.
  6. Click Save
In Shopify: Add SMS consent collection to checkout 

In Shopify: Add SMS consent collection to checkout 

The next step is adding SMS consent collection at checkout in Shopify. 

  1. In your Shopify admin, click Settings at the bottom of the left sidebar.
  2. On the Settings page, click Checkout.
    Settings page in Shopify admin with all cards grayed out exception for the Checkout card, which has a white background
  3. In the Marketing Consent Show an option to subscribe at checkout for SMS marketing.
    Marketing consent setting in Shopify with show an option to subscribe at checkout under SMS marketing checked off
  4. Scroll down to the bottom of the page and click Save.
Outcome

Outcome

Your checkout page will now have a section similar to the one shown below. 

Shopify checkout page showing checked box reading text me with news an offers, with a text box to enter phone number

Now, consent will now start syncing to Klaviyo when someone does all of the following steps:

  1. Enters their phone number.
  2. Selects the checkbox to accept SMS marketing.
  3. 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 does not need to complete their order to have their consent synced to Klaviyo. Thus, you can more easily and quickly grow your SMS list.

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

If you already have SMS subscribers in Shopify, you can export them into a CSV file and then import them into Klaviyo

Additional resources

Additional resources

Was this article helpful?
Use this form only for article feedback. Learn how to contact support.

Explore more from Klaviyo

Community
Connect with peers, partners, and Klaviyo experts to find inspiration, share insights, and get answers to all of your questions.
Live training
Join a live session with Klaviyo experts to learn about best practices, how to set up key features, and more.
Support

Access support through your account.

Email support (free trial and paid accounts) Available 24/7

Chat/virtual assistance
Availability varies by location and plan type