Email Script Token Not Resolving in a URL Link


When using Email Script Tokens to generate URLs in an email, the URLs fail to resolve and show the email script in the browser's address bar rather than the URL.


Email Script Tokens are written using Velocity Script, this means the Email Script Token must compile on the sending server before the email is delivered. This issue typically happens when you are trying to include a Email Script Token in a tracked link. Tracked links will always appear in your email as either your branded domain and a randomized series of characters, or begin with 'mkto' followed by a randomized series of characters. Marketo uses tracked links to help gather link clicks and cookie leads who are visiting your website. This is awesome, but this stops Email Script Tokens from compiling. You have two options for resolution:
  1. Remove the Email Script Token from the link, and consider creating a person attribute to use instead. Custom person attributes can be referenced as Person Tokens in a Email, and Person Tokens work great with tracked links.
  2. Disable the tracking on this link. This can be done by adding the following class to the HTML of your link: class="mktNoTrack"

More can be read on disabling link tracking here.