Looking for the best way to populate a UTM_Content tag from email in an automated way when using the Web Analytics Connector (WAC). I'm trying to wrap my head around some of the Q&A that's on here about this, and it seems like I might not even be able to populate %%LinkName%% if the content is pulled in via AMPScript (like storing a header in My Content?).

Is there a better way at this?

Will I need to try the concatenation solution as described here: Variables in Alias Tags

  • I must not understand the concatenation solution mentioned above because no matter what I try, I still see the variable in the alias, and not the alias name: &utm_content=%%%3dv(%40linkname)%3d%%& Is there any way to automatically populate the utm_content tag rather than hard coding it???? Jun 21, 2017 at 23:16
  • I believe that you can have SF Support configure a default variable, so that it is always e.g. %%=v(@UTMcontent)=%% - but then you need to ensure that you always store / generate that variable in the email (header or template). But i am not sure if it works with UTM_Content or only the custom variables - i've seen a solution about automating it, but it is cumbersome work Jun 30, 2017 at 10:07

2 Answers 2


I asked a similar question to Salesforce a while back, and the reply I got is posted below here:

Jason Meketa, one of our SE champions, shared the approach for "dynamic" WAC variables passing. Basically you'll mix a configuration of WAC with some scripting to determine the outcome. The result is dynamically applied URL parameters at your discretion using the Web Analytics Connector (WAC) that is normally all or nothing.

Web Analytics Connector Setup:

In the email_XtraLinkParameters brand tag (within Manage provisioning system) for the account (MID) do something like this... %%=v(@linkvar)=%%

This means the WAC will display that AMPScript variable's contents if it exists on the URL for every link in that email.

Email Code:

Just simply have an AMPScript block anywhere in the email, template, or a content area for that email that contains the setting of the variable used in the WAC setting. Here is an example.

set @linkvar = CONCAT("&var=", _subscriberkey)

You can use this approach to set the dynamic URL parameters per email or email template sent from the Marketing Cloud.

It does require scripting, but allows you to be template/email specific and code it within the email itself handling empty variables etc.


I know it's very late and maybe you already found a solution. But, when I faced this issue recently, I couldn't find an exact solution. After struggling for a while, this is how it worked for me:

Make sure your WAC configurations are set and utm-content is set to %%linkname%%

In your email:
Please refer Concat method for proper use

        var @url
        SET @url = CONCAT("<static url string>", @<dynamic content>)

Your anchor tag:
utm-content is configured from the WAC Config. When alias is not used or alias = "", %%linkname%% populates the value inside href as a string hence the issue &utm_content=%%%3dRedirectTo(%40url)%3d%%.
So, set alias=">Your intended utm-content<" something like:

        <a alias="my_link" href="%%=RedirectTo(@url)=%%">Click Me!!</a>     

Now, when the URL gets appended with UTM params, your utm-contet would be


You must log in to answer this question.

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