How to use Smart Opt-in to collect SMS consent in sign-up forms
To use Smart Opt-in, you must have:
- A paid SMS plan.
- Set up SMS in your account.
Learn how to enable Smart Opt-in in a sign-up form to collect and verify SMS consent from site visitors. When a shopper enters their phone number, they receive a one-time code to enter in the form and confirm their consent for SMS marketing. Mobile browsers that support one-time-code autofill can suggest the code for them.
SMS sign-up forms with Smart Opt-in reduce the friction of shoppers needing to take action in their messages app, and minimize distractions since shoppers can opt in without needing to leave your site. They can also help you avoid list bombing when using a branded sender ID.
Before you begin
This feature is not currently supported when lead capture with Shop is enabled, and cannot be used in any form that collects transactional SMS consent.
Smart Opt-in is also unavailable for age-gated accounts, back in stock forms, and forms that collect WhatsApp consent.
Note that if you downgrade to a free SMS plan after creating 1 or more Smart Opt-in sign-up forms, these forms will no longer work. You will either need to republish the forms without the Smart Opt-in step, or resume your paid SMS plan so that they function properly.
How Smart Opt-in works
The process for collecting SMS consent in a sign-up form through Smart Opt-in works as follows:
- A site visitor inputs their phone number in a form with Smart Opt-in configured.
- The site visitor receives a text at that phone number with a one-time code (e.g., 123456).
The one-time code will not send from your brand’s regular sending number; it will send from a short code managed by Klaviyo, so this message will not be on the same thread as your regular, promotional messages.
- The site visitor sees an additional form step asking for a one-time authentication code.
- Based on their device type, the site visitor enters the code and submits the form to confirm their opt-in status.
- If the visitor is viewing the form on a mobile device, they can use one-time-code autofill if their browser supports it, or enter the code manually.
- If the visitor is viewing the form on desktop, they must manually copy the code from their SMS messages into the form.
Smart Opt-in uses a double opt-in process: visitors enter their phone number, then confirm their consent by entering the one-time code they receive. Double opt-in is strongly recommended when collecting SMS consent, and in the US it is required if you plan to add SMS to your abandoned cart flows.
To learn about how Smart Opt-in compares to other SMS consent collection methods (e.g., tap-to-text), check out our SMS opt-in methods reference.
Configure Smart Opt-in in a sign-up form
To begin, navigate to Sign-up forms in Klaviyo’s left-hand navigation. From here, you can either:
- Customize a pre-built template that has Smart Opt-in already configured
- Configure Smart Opt-in on one of your existing forms
Display your Smart Opt-in forms only in countries where you have an active sending number. You can use the same form across your supported countries (e.g., the United States, United Kingdom, and France) by targeting it by location. Location targeting checks where visitors are browsing, so it does not guarantee that the phone number they enter can receive the code.
Customize a template with Smart Opt-in pre-configured
To update a template where Smart Opt-in is already set up:
- In the top right corner, select Create form.

- Choose a pre-built template with Smart Opt-in already configured.
- In the template preview:
- Name your form
- Choose the list that new SMS subscribers will join
- If the template also collects email consent, choose the email subscriber list

- Select Create form to enter the form editor.
- Select Targeting & display behavior, then click Targeting.
- Under Location, turn on Show to audience in certain locations, then select the countries where you have an active sending number (e.g., United States and United Kingdom).

- Customize the content, design, and behavior of your form, including any teaser, to fit your brand and goals. See getting started with sign-up forms for more guidance on editing your form.

Be sure to customize each step of your form, including the One-time code step and Success step.
Smart Opt-in templates include a phone number step followed by a One-time code step. Both opt-in steps include a submit button, and the One-time code step additionally includes a button to resend the code. Klaviyo pre-configures these buttons with the appropriate action settings, so you do not need to adjust them manually. Some pre-built Smart Opt-in templates may also include an Email Opt-in step before or on the same step as the phone number field.
When you’re finished customizing your sign-up form, click Publish or schedule. To make the form live immediately, select Publish now, then click Publish now to confirm. Then, see the SMS messaging details for Smart Opt-in section for SMS billing information.
Configure Smart Opt-in on an existing form
You can configure Smart Opt-in on an existing, email-only form, or alternatively, you can change an existing SMS opt-in form to use Smart Opt-in. The following sections will outline each option.
Add Smart Opt-in to an existing email-only form
If you have an existing form that collects email consent only, add an SMS step and configure Smart Opt-in. This adds 2 steps: a phone number step and a One-time code step. If Smart Opt-in is disabled because you have reached the form’s step limit, remove an unneeded step before adding it.
- Next to the form you’d like to add Smart Opt-in to, select the 3 dots > Edit.
- Click (+) Step in the menu bar to add a step.

- Select Mobile opt-in, then click Next.
- Select Text messaging, then click Next.

- Choose the list that new SMS subscribers will join, then select Smart Opt-in.
- Click Add step.

- Customize the design and content of the newly added Text Opt-In and One-time code steps to match the rest of the form.
- Select Targeting & display behavior, then click Targeting.
- Under Location, turn on Show to audience in certain locations, then select the countries where you have an active sending number (e.g., United States and United Kingdom).

- Review any form alerts and resolve blocking issues before publishing.
- Click Publish or schedule. To make the changes live immediately, select Publish now, then click Publish now to confirm.
See the SMS messaging details for Smart Opt-in section for more information.
Change an existing SMS form to use Smart Opt-in
If you have an existing SMS sign-up form, change the opt-in method to use Smart Opt-in:
- In Sign-up forms, select the 3 dots next to the form, then click Edit. In the editor preview, click the phone number input block.
- Under Text messaging opt-in method in the left-hand menu, select Enable.

- Click Smart Opt-in > Add step.

- Customize the design and content of the One-time code step and Success step to match the rest of the form.

- Select Targeting & display behavior, then click Targeting.
- Under Location, turn on Show to audience in certain locations, then select the countries where you have an active sending number (e.g., United States and United Kingdom).

- Review any form alerts and resolve blocking issues before publishing.
- Click Publish or schedule. To make the changes live immediately, select Publish now, then click Publish now to confirm.
See SMS messaging details for Smart Opt-in section for more information on messaging with Smart Opt-in.
SMS messaging details for Smart Opt-in
Once published, site visitors who submit their phone number on the phone number step will receive an SMS message containing a one-time code. The message will read as follows:
“Your {SMS Organizational Prefix} verification code is: 123456”
Klaviyo will automatically translate this message to the appropriate language based on the recipient’s country code. This message will not count against your brand’s Mobile Messaging spend, even if a shopper requests multiple authentication codes. Similarly, Klaviyo will not record a Received SMS event on the recipient’s profile for this message.
Klaviyo formats your SMS organizational prefix for verification messages, shortening it when needed and removing unsupported characters. If you have not manually set up an organizational prefix, it defaults to the company name associated with your Klaviyo account. Due to compliance reasons, messages sent to Canadian recipients will not contain an organizational prefix.
On mobile, site visitors can use one-time-code autofill if their browser supports it, or enter the code manually. If a shopper is browsing on a desktop, they’ll need to copy the code from their mobile device into the form.
Once a site visitor adds the code and submits the One-time code step, they will see the form’s Success step and their Klaviyo profile will reflect a Subscribed consent status for SMS marketing. Additionally, a Subscribed to SMS Marketing event will log on the subscriber's Klaviyo profile with the date and time of their opt-in.

If a site visitor inputs an incorrect code into the form, they’ll see an error alerting them of an invalid code, and the option to re-enter the code or request a new one.
See getting started with form analytics for guidance on tracking performance metrics for your form, including submit rates per step so you can see where potential subscribers are abandoning the opt-in experience within your form.
Troubleshooting Smart Opt-in
Delivery of messages containing the one-time code is dependent upon the end carrier, so delays and message failures can still occur in the case of an outage.
If your sending number can receive text messages, consider adding an SMS subscribe link in a smaller font at the bottom of your One-time code step as a backup. Subscribe links open tap-to-text on mobile and a subscribe page on desktop. If you use a branded sender ID, follow the linked article’s guidance for a subscribe page that collects phone numbers. Alternatively, if you have two-way messaging capabilities, add instructions for sending your subscribe keyword to your sending number (e.g., “Having trouble with the code? Instead, text JOIN to ### to subscribe.”).
If you include a backup opt-in method on the One-time code step, ensure that the required disclosures are included for that method (e.g., subscribe link, tap-to-text, etc.).
Smart Opt-in is not supported for age-gated accounts. Remove the One-time code step before publishing an age-gated form.
Additional resources
- SMS opt-in methods reference
Learn about the different methods for growing your SMS list with Klaviyo.
- Basics: SMS compliance
Get an overview of 7 important aspects of SMS compliance.