0

I have Google Analytics enabled in the account and there is one link that get broken when the analytics code is appended to it. After talking to ET/SFMC Support they suggest concatenating the link. However, I have a style applied to it and the double quotes do not work. I tried escaping the characters or replacing the double quotes with single quotes and it still doesn't work. Do you have any suggestions?

Example:

%%=V(CONCAT("< a href=",@Confirmation_URL," style=\'color: rgb(57, 181, 73); text-decoration: none;\' target=\'_blank\'>",@Confirmation_URL,"</a>"))=%%
1

First, you don't need the v() function. No need to escape the single quotes, you're just missing a single quote after the href:

%%=concat("<a href='", @Confirmation_URL, " style='color: rgb(57, 181, 73); text-decoration: none;' target='_blank'>",@Confirmation_URL,"</a>")=%%
  • Is there a way to escape double quotes? – gcardona Aug 21 '15 at 18:00
  • 1
    Yes. It's described in the Constants section on the AMPScript Syntax Guide page. – Adam Spriggs Aug 21 '15 at 18:05
  • 1
    another option is to pass the ascii value for doublequotes into the char() function. Example: %%=concat("<a href=",char(34),@confirmation_URL,char(34),">",@Confirmation_URL,"</a>")=%% – David Devoy Aug 28 '15 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.