Email Script Token Not Resolving in a URL Link | Community
Skip to main content
KCS_Integration
Level 2
October 3, 2018

Email Script Token Not Resolving in a URL Link

  • October 3, 2018
  • 7 replies
  • 3861 views

Issue

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.
 

Solution

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.


This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

7 replies

SanfordWhiteman
Level 10
October 3, 2018

@Roxann McGlumphy​, I need to talk to you about this Support doc. It's mistakenly saying you can't have tracked links in Velocity-generated content. This is not at all true. Let's work to tell people the real conditions under which links in Velocity content can cause problems, as I've written about previously on my blog.

Roxann_McGlump1
Level 5
October 3, 2018

Sure, Sanford - do you want to send me an email or just do it here in the comments?

SanfordWhiteman
Level 10
October 3, 2018

Well, a place to start is this blog post: https://blog.teknkl.com/multiple-marketo-tracked-links-in-velocity/

The problems with tracked links happen when you reuse the same Velocity $reference (i.e. variable) for more than one link.  This confounds the parser. A single use of a $reference, or merely static text used to output an <a> tag, is not a problem.

Roxann_McGlump1
Level 5
October 3, 2018

That blog post is relatively deep-dive.  Do you have specific suggestions for addition to the article, or should we just allow your comment to provide additional options?

SanfordWhiteman
Level 10
October 3, 2018

The article shouldn't say the options are

[1] don't even try

[2] turn off tracking

Because in the simplest case (a single link) it absolutely does work, there's no reason to fall over to not doing it or finding workarounds.

I'll PM you what I think might be better text.

Roxann_McGlump1
Level 5
October 8, 2018

Did @Elysia Nason​, the original author of this article, reach out to you?  I think she had some clarifying questions she wanted to ask.

SanfordWhiteman
Level 10
October 9, 2018

She did, but I'm waiting for another response from Elysia with details about the specific original case.