URLs in Email Script Token Not Tracking
Description description
URLs generated by a Velocity script token are not tracking when a person clicks on the link in an email
Resolution resolution
Velocity scripting enforces strict formatting of links in order for them to be tracked:
http://orhttps://must be included in the URL. If using a variable, thehttp://orhttps://must be output outside of the variable.- The URL must be part of a fully formed
<a>tag. No other type of link tag will work - Links must not be outputted from within a for or foreach loop
To ensure links are tracked properly, set the entire path inside a variable and then print the variable.
Correct:
#set($url = "www.example.com/${object.id}")
<a href="http://${url}">Link Text</a>
Correct:
<a href="http://www.example.com/${object.id}">Link Text</a>
Incorrect:
<a href="${url}">Link Text</a> (missing http/https)
<a href="{{my.link}}">Link Text</a> (missing http/htpps, cannot reference an outside my.token)
<page xlink:type="simple" xlink:href="https://www.example.com">Click me</page> (must use an <a> tag)
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f