Hello,
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 "https://www.survey.com?prov=Ontario"
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
#if($clinics.Map.get($CID))
<a href="https://www.survey.com/?prov=$clinics.Map.get($CID).PROV">this survey</a>
#end
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 "https://www.survey.com/?prov=$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?
Thanks
Kenway
Solved! Go to Solution.
Try
<a href="https://www.survey.com/?prov=${clinics.Map.get($CID).PROV}">this survey</a>
Please highlight your code using the Advanced Editor's syntax highlighter so it's readable.
Then we'll continue.
Sorry Sanford Whiteman, would you please direct me to where I'd find the Advanced Editor? I've never used it.
Right here:
And then follow this steps from this prerecorded GIF:
Here is the script token where I tried to output the entire <a> tag as recommended.
#set($CID = ${lead.recentDischargeClinicID})
##if clinic id found
#if($clinics.Map.get($CID))
<a href="https://www.survey.com/?prov=$clinics.Map.get($CID).PROV">this survey</a>
#end
The token renders when I add the class="mktNoTrack mktNoTok". But then I'm not able to track the click performance of this link, which is important for this email.
Sanford Whiteman You are a gentleman and a scholar. It worked like a charm. Thank you so much.
Awesome!