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)