I set a variable @tracking within an AMPscript section at the top of all my emails. It's basically just a UTM string for Google analytics tracking. I'm wondering if there is some way (with AMPscript or another method) to have the string dynamically appended to all links within the email.

I'm thinking of something that happens as the send job processes? Otherwise I have to go through and add a lookup (for tracking variable) and URLencode function to every URL in new and existing triggered emails.

  • If my answer helped, please mark it as accepted so others can easily see this has been resolved. Thank you! Sep 5, 2017 at 17:37

2 Answers 2


The best way to do this is using the "Additional Email Attributes" that need to be enabled by support. When asking for the activation of this feature you need to provide the number of attributes you need. As far as I know the maximum currently is five. This feature has been designed especially for the purpose of adding tracking parameters.

With this feature enabled you will see additional text fields in the properties of your email that can then be filled with tracking parameters for example (see screenshot below).

Additional Email Attributes


If you want link-by-link control, you can do as @Markus-Slabina suggested.

The Web-Analytics Connector is also an option. It's an analytics set-up that is account-wide. It can include whatever AMPScript variables or personalization strings that fit your requirements.

It can be configured in Setup.

You must log in to answer this question.

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