0

I'm trying to make the following code work:

If you can't see the images in the email below %%=CONCAT(“<a href="%%view_email_url%%">click here</a>”)=%%…

The Concat function is to stop the link in the header from being tracked (https://help.salesforce.com/articleView?id=000314602&type=1&mode=1), but it doesn't work due to the 'view_email' AMPScript being nested within the Concat AMPScript. I've tried several fixes using the TreatAsContent function, but as yet not managed to make it work. Any help would be appreciated!

Thanks

  • 1
    Your first set of quotes look like they are not standard. May cause an issue – EazyE Jun 28 '19 at 15:39
0

current:

%%=CONCAT(“<a href="%%view_email_url%%">click here</a>”)=%%

Suggested changes: non-standard quotes replaced. plus, you cannot use personalization strings with %% pre- and suffix if you are inside an AMPScript block. So the entire concat changes a bit. You can use single quotes to differentiate the three parts:

<a href="

%%view_email_url%%

">click here</a>

Since you will get a problem with %% inside the %%[ block ]%%, try setting a variable with the value of view_email_url (to be clear - without the %%s, as you are inside the AMPScript block)

- resulting in:

%%[ set @linkUrl = view_email_url ]%%
%%=CONCAT('<a href="',@linkURL,'">click here</a>')=%%

Didn't test if this tracks the link or not, but it should be a working VAWP link.

|improve this answer|||||

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.