0

I have URLs that are dynamic based on the user I want e.g. https://website.com/user/username/settings . The data extension I want to set @username = username, then input it in the middle of the string and concat the three values. This is the AMPscript I have below, but I keep running into a 404 error where it's not picking up the username and just defaulting them to https://website.com/user/settings. Any thoughts?

AMPscript below:

%%[ 
Var @URL, @Username, @UserURL
Set @URL = "https://website.com/user/" 
Set @Username= @Username
Set @UserURL = Concat(@URL,@username, "/settings") 
]%%

<!-- Email Code -->

<a href="%%=RedirectTo(@UserURL)=%%"> Go to your username page </a> 
1
  • 3
    is this a type in your code Set @Username= @Username. should it be Set @Username= Username
    – EazyE
    Nov 3, 2021 at 1:32

1 Answer 1

2

I'd suggest sending the email to yourself, copying the URL from the email into wheregoes.com to investigate the tracking hop and then the final destination URL.

You should always test links from your inbox, not send-preview.

You must log in to answer this question.

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