VTL code of my.token appears in tracked link
Hi everyone,
I faced a strange situation using a my.token for the href of a tracked link. For some reason marketo uses the VTL code as link target of the tracked link enstead of the code output.
I'm pretty sure this worked in the past. Did one of you had the same issue?
Kind Regards
Wolfram
Whats the detailed situation?
We receive a personalised link via webhook. This link is stored as in data field.
If we would use that link in our email everything would be fine. BUT the link contains the https protokoll and so it is not tracked.
To fix this we created an email script token. The theorie is pretty easy .... the script token removes the 'https://' using the replace methode. The https:// protokoll is hard coded in the email and ensures that marketo will track the link.
Adding this token to the email the link target url is shown correct in the preview. Is the token added as text it is rendered correct as well. As well the link tracking will be added to the a-tag.
But after clicking the tracked link in the email you will not be redirected to the URL. Instead you can see in the console that marketo tried to forward you to the VTL-code which is (naturally) recogniced as a not valid link.
Example
{{my.Invitation-Link}} in my.tokens
#set( $urlField = $member.option1 )
#set( $urlNoProto = $urlField.replaceAll("(?i)^https?://","") )
${urlNoProto}
Use in the email
<a href="https://{{my.Invitation-Link}}">Your personal Invitation Link</a>
Console output in browser
