1

I've found that the RedirectTo(CloudPagesURL) not working when the SMS is sent from Journey Builder. The link is working fine when testing in MobileConnect. Below is the ampscript I am using in the SMS.

%%[
SET @link1 = CloudPagesURL(1657,'Id','1234567890','option','1')
SET @link2 = RedirectTo(CloudPagesURL(1657,'Id','1234567890','option','2'))
]%%

Link1: %%=v(@link1)=%%%%=char(10,1)=%%
Link2: %%=v(@link2)=%%    

Below are the links generated.

Link1: https://pub.s7.exacttarget.com/0le55wmcyak?qs=e060acce0a7fb7a588df2e22b3bd7db7bd5a2e8bfb704548acd920295094828d18b0efa4f40a1c53045dcf8c8ef725c3

Link2: https://pub.s7.exacttarget.com/0le55wmcyak?qs=e060acce0a7fb7a588df2e22b3bd7db7bd5a2e8bfb704548acd920295094828d18b0efa4f40a1c535edbbe8a5f41a119

Code in Landing Page

%%[
SET @Id = RequestParameter("Id")
SET @option = RequestParameter("option")
]%%
Id: %%=v(@Id)=%% <br />
Option: %%=v(@option)=%% <br />
1

There's no need to wrap the CloudPagesURL function in a RedirectTo.

The CloudPage URL already includes all of the encrypted parameters in the send context.

%%[

SET @link1 = CloudPagesURL(1657,'Id','1234567890','option','1')
SET @link2 = CloudPagesURL(1657,'Id','1234567890','option','2')

]%%
Link1: %%=v(@link1)=%%
Link2: %%=v(@link2)=%%   

Not sure why you'd need the %%=char(10,1)=%% part at the end of the URL. That may be causing an issue.

Be sure and initialize your variables in the page:

%%[

var @id, @option
SET @Id = RequestParameter("Id")
SET @option = RequestParameter("option")

]%%
Id: %%=v(@Id)=%%
<br>Option: %%=v(@option)=%%

If it still doesn't work with these changes, then I suspect there's another issue in your CloudPage scripting.

  • Thanks @Adam, I've tried using both, with and without wrapping RedirectTo and it still doesn't work. The '%%=char(10,1)=%%' is for line break in the SMS. Also, I don't have any other script on my page. As I mentioned earlier, it's working fine during the test in MobileConnect but doesn't work when the SMS sent from the Journey Builder. – mdabdulateeq Sep 11 '18 at 0:27
  • Did you initialize your variables in the CloudPage? – Adam Spriggs Sep 11 '18 at 1:39
  • Yes, I did initialize the variables. – mdabdulateeq Sep 11 '18 at 4:40
  • According to this answer, tour subscriber must exist in All Subscribers for the CloudPagesURL to function properly in SMS: salesforce.stackexchange.com/a/210471/5202 – Adam Spriggs Sep 11 '18 at 10:27
  • Yes, that's correct. Once the contact is added to the All Subscribers data, the link is working. – mdabdulateeq Sep 14 '18 at 5:10
0

If you just sending the SMS to the records who are not in the All Subscribers data then the personalised Cloud Page URL doesn't work.

All we need to do is create an automation to add the records to All Subscribers data. Once it is done, the personalised links using CloudPageURL will start working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.