Using Forms to Collect SMS Consent on Shopify

Last updated at:


If you are employing Klaviyo’s SMS capabilities and host a Shopify site, it is vital to collect SMS consent and contact information correctly on that domain. You must also include clear language that directly informs the customer that, by inputting their number, they are opting into receiving your SMS communications. In this article, we will discuss three ways to update your Shopify store to include SMS consent as well as how to send that consent to Klaviyo.

Make sure that the consent syncs from your Shopify store into Klaviyo before contacting these customers via text messaging.

Language for SMS Consent

When gathering customer phone numbers for SMS marketing, you must include language that explicitly states that these individuals are consenting to receive text messages from your business. SMS consent laws are stringent and could result in fines if not adhered to appropriately with proper phrasing for gaining consent. Messaging that only says that customers are opting in for general marking (and does not mention SMS specifically) is not sufficient.

Below is an example of phrasing that appropriately informs customers that they are subscribing to receive marketing SMS communication from your business:

By clicking SIGN UP NOW, you agree to receive marketing text messages from (your organization's name) at the number provided, including messages sent by autodialer. Consent is not a condition of any purchase. Message and data rates may apply. Message frequency varies. Reply HELP for help or STOP to cancel. View our Privacy Policy and Terms of Service."

When you add a phone number block to any Klaviyo signup form, language like this is added automatically. Further, there is a sentence reminding you to update the links to your privacy policy and terms of service. 

Methods for Collecting SMS Consent in Shopify

The following methods for collecting consent involve using Klaviyo signup forms. You should have the option to publish Klaviyo forms on your site through your integration. If you are not currently using Klaviyo signup forms or are unsure if you can, head to our article on installing Klaviyo signup forms.

Below, we discuss how to gather SMS consent via:

Collecting Consent with a Popup or Flyout

The first method of collecting SMS consent on your Shopify store, and one we recommend for most users, is to collect consent via a signup form, such as a popup or flyout, using the Signup Form Builder. These forms should include a phone number field where customers input their number as well as the necessary messaging for gathering SMS consent. In Klaviyo, you can either create a form from scratch, use a pre-built template from the Form Library, or add a phone number field to an existing form (if you already have one for your site).

In the example below, one of Klaviyo’s pre-built popup form templates is used to collect consent. Head to Signup Forms > Create Form to select an option from the Form Library.

Drag a phone number block into the form. From the Action dropdown, select Subscribe via SMS

Note that when you add this block, the Collect SMS consent option will be enabled and a text block with language to adhere to compliance guidelines will appear below the block. (If you have questions regarding SMS consent, we recommend contacting your legal counsel.) 

In the text block, change the Privacy Policy and Terms of Service links with those for your brand and add notes to these policies that explicitly mention SMS marketing. Once done, delete the last, highlighted sentence.


Here you can also edit the label, profile property, default country, and whether or not a phone number is required to submit the form. We do not recommend altering Profile Property if you want to use this property for sending SMS messages. Further, there’s an option to change the default country, but keep in mind that SMS messaging is only available in certain countries. You will likewise be able to style the phone number input in accordance with your brand's design.

Once you've styled and configured the form, click Publish in the upper right-hand corner of the screen.

When you click Publish, a popup box will appear to confirm that you have replaced the Privacy Policy and Terms of Service links with those for your brand. If you have questions regarding SMS consent or these policies, contact your legal counsel.


Learn more about TCPA best practices. For more information on creating forms to collect consent and how to create a Click-to-Text Form (only available on mobile devices) checkout our guide on How To Collect SMS Consent.

As with any other popup or flyout form, you can change the timing and frequency for when it will display to customers. You can also set specific URLs to indicate where it should appear on your Shopify site via the Behaviors tab, as shown below. Through this approach, you can have it appear on, for example, your cart or checkout page.


Collecting Consent with an Embed

Using an embedded form, allows you to insert a phone number input field directly onto your site. For the sake of an example, let’s look at how to include an embed onto a footer.

As with a popup or flyout form, add a phone number input field, use the Collect SMS consent option, and include language that clearly states the person is opting into receiving text messages from your business.

When you publish a Klaviyo signup form, a popup box will appear with the form’s embed code. You can also get this code from the Behaviors tab on the left-hand side of the page. Copy this code so that you are ready to paste it into your Shopify store.


Select Publish.

To add your form's embed code we're going to now follow a three-step process:

  1. Locate where on your site you want to add your form.
  2. Get to where you can edit the HTML of your site.
  3. Paste in your embed code, and adjust your form's styles as needed.

To start, head to your Shopify admin page and select Online Store. Click on Themes and then select the dropdown Actions > Edit code.


Let's say you would like to have your signup form display above your site's copyright information in the footer. Open the footer.liquid theme file (found under Sections).

Next, search for the term copyright in the file. Next, on a line above the opening <div> tag for the copyright code, paste the form embed code that you had copied from Klaviyo, as shown in the following screenshot.

For more information on creating an embedded form in Shopify, including inputting it in other areas of your store, visit our documentation on How to Find Where to Paste a Form's Embed Code.

Finally, head back to your Shopify store and scroll down to your footer (or wherever you choose to insert your embedded form) to check that it was inserted properly and looks as you had desired.

Another key place on your Shopify site where you may want add an embed for to collect consent is on the Order Confirmation page. This will allow you to gain SMS consent from customers after they check out and place an order. To learn more about adding this form, head to our article, Embed a Form to your Order Confirmation Page.

Additional Resources

Learn more about SMS on the Help Center:


Was this article helpful?
28 out of 42 found this helpful