Hello!
We have a field in Marketo of the type URL. The values in that field are full URLs, like: https://www.timetrade.com/app/....
If I want to bring these URLs into emails using the token like that:
<a href="{{lead.SFDCLeadOwnerTimeTradeURL}}">
that link doesn't get decorated = redirected = tracked. I know, it's because the "https://" part of the link is in the token and not on the email as it should. Is there any way I can have this link decorated nonetheless?
Thanks!
Michael
Solved! Go to Solution.
Mmm, glad that did it! But emitting the Velocity reference (${urlshort)) directly in the email is not supported (it's an artifact of Marketo's use of Velocity in general, even without userland tokens).
I did mean having the Velocity token emit the whole <a>. Try it with the three lines directly in the token, then include the {{my.token}} name.
#set( $url = $lead.SFDCLeadOwnerTimeTradeURL )
#set( $urlshort = $url.replace( "https://", "") )
<a href="https://${urlshort}">schedule a time</a>
You can use Velocity to emit a fully-formed <a> link based on that field and it will be tracked. This is a good/necessary workaround when fields can't be stopped from including a full URL.
Thanks Sanford!
Disclaimer up front: I don't really speak Velocity. I'm just a rather oblivious user.
But that said:
<a href="${lead.SFDCLeadOwnerTimeTradeURL}">Just add a date on my calendar</a>
This string from my script token does not return a decorated link. But with "emit a fully-formed <a> link", I suppose you mean something like this:
#set( $url = "${lead.SFDCLeadOwnerTimeTradeURL}" )
#set( $urlshort = $url.replace("https://", "") )
and putting
<a href="https://${urlshort}">schedule a time</a>
on the email. That indeed works fine.
Mmm, glad that did it! But emitting the Velocity reference (${urlshort)) directly in the email is not supported (it's an artifact of Marketo's use of Velocity in general, even without userland tokens).
I did mean having the Velocity token emit the whole <a>. Try it with the three lines directly in the token, then include the {{my.token}} name.
#set( $url = $lead.SFDCLeadOwnerTimeTradeURL )
#set( $urlshort = $url.replace( "https://", "") )
<a href="https://${urlshort}">schedule a time</a>
Thanks again, Sanford. Got it. Did it - works beautifully!
Great!