SMS source code issue

  • 10 September 2021
  • 4 replies

Userlevel 1
Badge +3

Hey everyone!

I’ve followed the guide

I’m making a text box and I’ve followed the GIF instructions with the following code

<p style="text-align: center;"><a href="sms:+1%20<(844)933-4127&gt;?&amp;body=Send%20this%20text%20to%20subscribe%20to%20SMS%20Updates!%20%28ref:JOIN%29">Text JOIN to (844) 933-4127</a></p>

As you can see it’s looking fine, but the ‘To’ section when I actually click the message it looks wrong.

I am based in Australia, so I’m wondering whether it’s because of that, a code mistake, and if someone based in the US would see an actual number instead of +1<

Also, with this source code would I be able to create this into a button? Just for appearances and better CTA clicking, I imagine.

Thanks heaps in advance :)



Best answer by retention 10 September 2021, 19:18

View original

4 replies

Userlevel 7
Badge +58

Hey @Michael - welcome to the community!

I think you might have added an extra “space” between the +1 and the number.  %20 is URL encoding for a “space” so that’s why it stopped after the +1

Try this code (assuming 844-933-4127 is your number):

<a href="sms:+18449334127?&amp;body=Send%20this%20text%20to%20subscribe%20to%20SMS%20Updates!%20%28ref:JOIN%29">
Text JOIN to (844) 933-412

Try to copy/paste the code above in the “Source” editor in Klaviyo to make sure it’s a clean copy/paste. Let me know if it worked!


Userlevel 1
Badge +3

Hi Joseph,

Yes that’s perfect! Thank you so much for the help :)


I just tried this and it isn’t working (anymore)….has anyone else faced this issue?

Userlevel 7
Badge +60

Hey @JeffInDallas,

Have you tried copy and pasting without format and/or manually typing out the code as HTML instead of just placing it in the text editor? A lot of times I see users make the mistake of simply copying and pasting code. However, this causes additional formatting to be brought over which breaks the code function.

Alternatively, what inbox provider are you using and/or testing in? As called out in our How to use an email to collect SMS consent Help Center article:

Note that this approach is designed to automatically open a text message, but it will not work with Gmail or in Microsoft Outlook; however, everyone can see the banner and manually text your number to subscribe, regardless of their inbox provider.