I've received a MC Support case for a journey triggered send that outlines these 4 error codes relating to an AMPscript listed below.


Having followed guidance from other AMPscript experts on StackExchange and seeing the link render correctly in Preview / Testing, I thought my expression was correct. However, the live version of the email (even without tracking) isn't displaying the link and perhaps consequently, I've received the MC Support case.

Live link displays this: https://%26om_cmpgn%3D19_0_draft_reminder_1_en%26utm_cmpgn%3D19_0_draft_reminder_journey%26om_medium%3Demail%26utm_term%3Dcta_search/

SET @movein = FormatDate(Request__c:Moveindate__c, "DD.MM.YYYY",, "en-US") 
SET @moveout = FormatDate(Request__c:Moveoutdate__c, "DD.MM.YYYY",, "en-US") 
SET @city = AttributeValue("Request__c:City__c")
SET @countrycode = AttributeValue("Request__c:Apartment__r:Country_Code__c")
SET @utm_cmpgn = AttributeValue("utm_cmpgn")
SET @city_search_url = Concat('www.thehomelike.com/search/',@countrycode,'/',@city,'?available.from=',@movein,'&available.to=',@moveout,'?om_cmpgn=',emailname_,'&utm_cmpgn=',@utm_cmpgn,'&om_medium=',email,'&utm_term=',cta_city_search,)

Button link html:

<a target="_blank" class="buttonstyles" style=" font-size: 18px; font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; text-align: center; text-decoration: none; display: block; background-color: #6699CC; border: 0px; padding: 20px 99px; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;" href="https://%%=RedirectTo(@city_search_url)=%%" title="" alias="cta_city_search" conversion="false" data-linkto="other"><b>Browse other apartments in %%Request__c:City__c%%</b></a>

Any assistance on how to resolve these erros is greatly appreciated.

1 Answer 1


First of all, your href should be (as per my recent reply to your earlier question):

<a href="%%=RedirectTo(@city_search_url)=%%">Link</a>

Whereas your code has:

<a href="https://%%=RedirectTo(@city_search_url)=%%">Link</a>

Which is incorrect syntax.

You hence also need to change the way you define @city_search_url - which should start with 'https://':

SET @city_search_url = Concat('https://www.thehomelike.com/search/',@countrycode,'/',@city,'?available.from=',@movein,'&available.to=',@moveout,'?om_cmpgn=',emailname_,'&utm_cmpgn=',@utm_cmpgn,'&om_medium=email&utm_term=cta_city_search')

I also did some cleaning up of the strings you concatenate. Please read up on Concat function and use it accordingly.

  • Thank you, @Lukas! This worked. AMPscript is slowly starting to make more sense to me :) May 8, 2019 at 12:51
  • You're welcome. Remember also to mark my reply from yesterday as accepted May 8, 2019 at 12:53

You must log in to answer this question.

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