I'm using Salesforce Marketing Cloud and need to populate a link using AMPscript. For example, the link is


The link works when I preview the email. But when I test send, the link that opens is "https://website.com///" and all my variables are missing.

I have set the variables correctly as before this link was used, the previous link was


and it works.

Could it be because the link uses "/" instead of "=" which is somehow affecting how the AMPscript is working? Would you have any suggestions on how I can get the AMPscript to work? I don't think I can use the redirect link function as I have to feature the link 8 times with each time using different sets of variables according to the data extension.

Thanks in advance!

The link should be populated correctly when I click on it in my test send.

1 Answer 1


You should use the Concat function along with RedirectTo, to implement this properly. Resulting in following code:

<a href="%%=RedirectTo(Concat("https://website.com/",@variable1,"/",@variable2,"/",@variable3))=%%">Hello link!</a>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .