I am building hyperlinks that are included dynamically in text blocks using AMPScript in Marketing Cloud Emails.

It used to work properly but after enabling Web Analytics Connector (I supposed it is related with that but not 100% sure) all the concat() funtions that I am applying for building my hyperlinks are not working; the content including the tags is being removed automatically.

For the static links is ok. I mean, I can avoid the WAC interceptions following the steps explained here: https://gist.github.com/MyCueCards/e72bfbacdc4e6d8405cf9b137a701ecf

But here what I am doing is to include hyperlinks in existing text using AMPScript.

For example: if I have a text saying: "Please, if you want to know more click here." (this is my text block)

Then, I need to include a hyperlink in the word "here", so after applying my AMPScript code, the text block will looks like this:

'Please, if you want to know more click < alias= xxx "href = www.theweb.com" style="color: #ffre55;text-decoration:none;" title="here">here. </a>'

I am removing the a tags from the expression becuase if not they are also being removed.


  • what is your ampscript, if you put your code in a code block it shouldn't be rendered
    – EazyE
    Dec 13, 2019 at 21:55
  • I am NOT clear on the question, but I had faced a similar issue of being my HTML code being modified by the tool once i SAVED the blocks... later I was able to over come this by below solution..... Instead of TEXT blocks use HTML blocks, which does NOT alter your code in any way! Dec 14, 2019 at 18:05
  • Thanks both (EazyE and Vishal Kumar) for your feedback ! I am going to make some modifications to my code following your recomendations and let you know if it works. If not, I will provide you details about the code. Thanks again ! Dec 16, 2019 at 8:11
  • Also check out RedirectTo() function. Sometimes you get strange results when using ampscript to add the link directly. Dec 16, 2019 at 14:27
  • Thanks garek007 ! i will make a try and let you know. Dec 17, 2019 at 15:10


You must log in to answer this question.

Browse other questions tagged .