Marketo Tokens: Ins and Outs

Using Marketo Tokens to create more scalable, dynamic content

Program tokens are the best! Those are the the tokens that start with “my.” and they’re specific to Marketo programs and Marketo folders in the Marketing Activities section which hold programs (i.e., all folders except for local asset folders that are within programs).

We originally started venturing into tokenizing content back when I was venturing into making responsive Marketo landing pages, since the WYSIWYG had become so difficult to use. I had realized pretty quickly that you could bring in all content through tokens in programs, and it cut down the time required to make programs (landing pages, emails, and everything else) from something like 2 hours to 15 minutes.

Enter tokens, which still bring in all of the content—pictures, buttons, value propositions, titles, links, and text—except with tokens. You simply clone from your program template, edit tokens on the program, and all of the changes are populated instantly. We can publish tokenized responsive landing pages (hopefully becoming redundant soon with Marketo's next few releases!) while saving hours with each new program.

etumos-landing-page-tokens.png

We tokenize everything, and so should everyone. In fact, we don’t even use Marketo’s landing page WYSIWYG editor. We don’t even open it. Same with emails. When we make a Marketo program, we just clone from a template program and change tokens, and it takes about 10 minutes. Before, we would spend 45 minutes nudging elements left and right by single pixels to get it all perfect.

A Quick Tokenization Guide

Program tokens cascade. They can be inherited and overwritten. Ever had to go through yearly updating of the copyright year? Well this way you can save two days of busy work—plop that year into a Universal token.

Make a “Universal” folder in your Marketing Activities section. Put tokens in there that you’ll use everywhere. Here's a screenshot example of what we use on the Universal level:

And program tokens! Here's a screenshot of an email campaign template, one that fits in with our engagement programs:

Emails are a fun way to use tokens, because emails don’t actually have to reside within the program itself. They can be housed in the Design Studio and a flow step sending an email within the program means that the non-local email will have local program tokens. Best use? Universal Fulfillment Email.

There are generally three levels of tokens that we use: "Universal" level (on the top-most containing folder), "Folder" level (on any folder below "Universal"), and "Content" level (specific to the program). You can turn your programs into miniature content management systems through program tokens like this.

etumos-token-framework.png

Token nuances—the types of tokens

There are two types of tokens that we use everywhere: text tokens and rich text tokens. They have some nuances to them, which you can see in this table:

Text tokens containing full URLs will not be tracked in Marketo emails! That’s because the way email links are tracked for clicks is through shortening them specific to the user. Because text tokens aren’t filtered through normal processing, they won’t be shortened and you will therefore not find any link tracking to work.

Solution:

http://www.{{my.Email - CTA_URL:default=etumos.com}}” — now you have link-tracking tokens!

The best rule of thumb for determining if you should use rich text tokens or text tokens is this: do I want paragraphs? Because they’re going to show up whether you want them or not.

More questions you’ll need to consider:

Will a non-coder need to (and be able to) edit this? Will a non-coder need to change formatting on this?

Is this abnormal code that’s going to be filtered out when I don’t want it to be? JS? CSS? HTML with non-WWC-compliant attributes?

The final word on tokens

Note that you can’t put tokens inside tokens. The only exception is a Calendar token, which takes event tokens but not program tokens.

In text emails, rich text tokens spit out the full HTML. That means someone on a Blackberry (okay, probably just an old Blackberry) is going to see your raw HTML code output in the text-only email. Hence, in that case, we have back-up text tokens instead of rich text tokens.

Want to see tokens in action? It's easiest to see demos, which were luckily recorded during my session from Marketo Summit 2015: Architecting a Scalable and Robust Marketo Instance!

29122
43
43 Comments
Edward_Unthank_
Level 10

Hey Will, this doesn't apply to landing pages. Landing pages get their token values through being within Program in the Marketing Activities section. Emails and forms are exceptions to that rule.

Edward

Anonymous
Not applicable

I thought that email scripts were way beyond me but when Jenna Molby​ added them and explained the logic it now makes sense . Only took a year, but we are launching the localized date formats tomorrow!

Kevin_Lustgarte
Level 3

I'm relatively new to Marketo and just encountered the issue where link tracking doesn't work. I think I understand how to fix. But to clarify...

1. We have a CTA button in the email.

2. The CTA button text links to a FULL URL, which we load into a Marketo field.

3. The links are different for each person on the list.

4. I think what I've learned is that the URLs in the data file should include only what comes after the http://www.

-- is that right? I should hardcode http://www. then add the token right after?

SanfordWhiteman
Level 10 - Community Moderator

You should hardcode "http​://" or "https:​//" but the hostname isn't necessarily "www," so you should keep that part of the token.

The way that Marketo scans email content for trackable links requires this setup for standard text tokens.

Note that in contrast, Velocity (email script) tokens -- used for advanced customization -- must output an entire <a> tag (with its href and inner content filled in) and it will be trackable. So there is always a rule for when links are trackable, but the rules vary depending on context.

Kevin_Lustgarte
Level 3

Sanford, I really appreciate your feedback. I just set up a test but not feeling confident.

I did not actually set up a Rich Text token. Instead I edited my HTML behind the CTA button to now be, <a href="http://{lead.market research URL}">Click Here for Survey</a> ... or something like that ... and in the Market Research URL field on the CSV import I left off http://

This might work?

Anonymous
Not applicable

This should work but I would recommend doing a test against your own lead first just to check and verify via a test email before doing a large data import.

SanfordWhiteman
Level 10 - Community Moderator

I did not actually set up a Rich Text token. Instead I edited my HTML behind the CTA button to now be, <a href="http://{lead.market research URL}">Click Here for Survey</a> ... or something like that ...

OK, a {{lead.token}} behaves equivalently to a text {{my.token}}.

This might work?

Have you tested it? It's the standard setup.

Kevin_Lustgarte
Level 3

just sent the test to 5 people. they all clicked the CTA. and the link performance report is showing data for the link clicks where it wasn't before. I did set up a Rich Text Token -- which is essentially the CTA button URL -- and will test that too. Thanks for your help. I owe you a beverage in San Fran.

Kevin_Lustgarte
Level 3

The next thing? mailto: links in my emails. Like URLs do mailto: get appended with branded tracking links?

Anonymous
Not applicable

I've used mailto tokens before but haven't tracked them.