Sanford Whiteman

Emulating ##MKT_TOK## in Velocity

Blog Post created by Sanford Whiteman on Oct 25, 2019

The semi-secret email variable ##MKT_TOK## allows you to do something that’s otherwise impossible: create a link that isn’t tracked (rewritten to bounce off your branding domain) but is mkt_tok-enized so it still associates leads.

 

In other words, a link that is altered only by having the mkt_tok appended to the query string.

 

In the standard email body, you do this like so:

 

<a class="mktNoTrack" href="https://www.example.com/path/to/my/page.html?mkt_tok=##MKT_TOK##">Click me</a>

 

 

If you generate links in Velocity, though, that curiously-formatted ##MKT_TOK## doesn't exist. But it has a direct Velocity equivalent, $mktmail.MKT_TOK. So add that instead in VTL:

 

<a class="mktNoTrack" href="https://www.example.com/path/to/my/page.html?mkt_tok=${mktmail.MKT_TOK}">Click me</a>

 

That’s it, shortest post in a while!

Outcomes