0

Our emails are translated into 20 languages. The translations for each email are uploaded as a Data Extension with Country as primary key. Each email has its own DE. One of the columns contains a CTA button link (www.link.com) and another with the text of the link.

While editing an email in Content Builder, I am getting the CTA button using Reference Content block. The blue button has the following code (extra styling removed):

<a href="%%=redirectto(@buttonBlueURL)=%%">%%=v(@buttonBlueText)=%%</a>

However, when we send a test email to ourselves and click the button, we get a 404. The content is populating as it should but the link looks like: "https://click.domain.com/www.link.com?utms=parameters"

The code snippet that is setting the @buttonBlueURL and @buttonBlueText variables is within the email itself (not in the Content Block), which I think may be the reason it's not working properly.

What is the best way to solve this? We want to use Reference Content blocks so that when we update design, we don't need to update every single email.

3
  • Does @buttonBlueURL hold www.link.com with or without https:// ? Commented May 30, 2022 at 10:21
  • Aha it does not! I added the https:// and now it works. Thanks!
    – vc329
    Commented May 30, 2022 at 11:21
  • You're welcome, remember to accept my answer below, by clicking on the checkmark to the left. Commented May 30, 2022 at 11:22

1 Answer 1

1

I suspect this issue is caused by the @buttonBlueURL variable not holding the complete URL.

Current situation:

%%[
SET @buttonBlueURL = 'www.link.com'
SET @buttonBlueText = 'Click me'
]%%
<a href="%%=redirectto(@buttonBlueURL)=%%">%%=v(@buttonBlueText)=%%</a>

Where the expected solution would be:

%%[
SET @buttonBlueURL = 'https://www.link.com'
SET @buttonBlueText = 'Click me'
]%%
<a href="%%=redirectto(@buttonBlueURL)=%%">%%=v(@buttonBlueText)=%%</a>

You must log in to answer this question.

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