I'm trying to include a couple of variables within a Concat inside an Alias tag and I am not seeing the expected string in "LinkName" reporting values but rather the variable names.

So I get something like this: SomeText',@Version,'-',@CampaignDate,'-',SomeMoreText

Is there any workaround for this? I was hoping that using the AmpScript function called Output and wrapping that around the Concat might work but so far no luck there.


3 Answers 3


I just had this problem, but I think I've found a less painful solution. You don't have to put the entire anchor tag into Concat - just the alias attribute and value.

So instead of trying to put this in your HTML:


try this - make sure you leave spaces either side of it:


Then ensure you've got this set somewhere (you'll need to set @title too) - in my case I have a loop that sets this for each row:

Set @alias = Concat('alias="', @title, '" ')

Seems to work in a quick test email.

  • You could also do this instead of creating another variable: <a href="#" %%=concat("alias='",@title,"' ")=%%>whee</a> Oct 13, 2016 at 13:40

AMPScript variables will not get evaluated in alias tags, unfortunately (confirmed by SFMC Support). Best thing to do is not use the linkName in your web-analytics connector or always use static values for aliases.

You can work around it by building the entire anchor tag -- href, alias and all --in AMPScript using concat(), which is a royal pain.

  • 2
    Well that bleeping stinks, but at least confirms what I had found. :-) Thanks for the info Adam!
    – Mark P
    May 21, 2015 at 13:17
  • ^^^ Might be my all time favorite comment here. May 21, 2015 at 13:32
  • 1
    Is this still the case? Documentation shows Ampscript in the alias. developer.salesforce.com/docs/… Sep 27, 2018 at 17:33
  • I believe so. Just ran across it again last week. Sep 27, 2018 at 21:18
  • 1
    Interesting. We have variables building dynamic alias values and the problem we are seeing is some render correctly while others are the full URL, even for the same link. Someone did bring up the 100 unique url to alias combinations. I can't find any documentation around this. Oct 3, 2018 at 22:57

This is now possible without any hacks. Works only for html emails. Source: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/guide/mc-ampscript-guide-language-basics-dynamic-link-aliases.html

You must log in to answer this question.

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