AnsweredAssumed Answered

Velocity Token URL Parameter, Tracked but Not Rendering

Question asked by Kenway Du on Jul 23, 2019
Latest reply on Jul 24, 2019 by Sanford Whiteman



I'm trying to create an email that links to a survey, and that link needs to have a province parameter that is displayed via a velocity script that fetches the information from a custom object. 


Basic example:

Fill out this survey

"this survey" would be hyperlinked to ""

The "Ontario" value represents the province of a clinic they recently had an appointment with, and would use the clinic ID to fetch the province via velocity script from a custom object. 


The issue is that we need this link to be trackable, and I read in other posts that in order to have it trackable, I'd need to output the entire <a> tag from the velocity token itself. So I've tried:


Name of script token: {{my.SurveyLink}}


#set($CID = ${lead.recentDischargeClinicID})
##if clinic id found
<a href="$clinics.Map.get($CID).PROV">this survey</a>


In my email, I have:


<p>Fill out {{my.SurveyLink}}</p>


I sent a live email to myself to test it. The good news is it tracks the click.. The bad news is the parameter token doesn't render (i.e. the URL becomes "$clinics.Map.get($CID).PROV")


Would anyone be able to point out what I could change to have the token render properly and also have the link be trackable?