Marketo email template syntax: modules, tokens and DKIM
How Marketo templates become editable (mktoText, mktoModule, variables), token defaults that never print an empty name, and DKIM that passes DMARC.
500
On this page
A Marketo email template is plain HTML in which class names mark what an author may edit: mktoText, mktoImg, mktoSnippet and mktoVideo for single regions, <meta> variables such as mktoColor that the template prints as ${id}, and mktoModule sections inside one mktoContainer. A token such as {{lead.First Name:default=there}} prints the text after default= when the field is empty. To authenticate, add include:mktomail.com to SPF, publish a custom DKIM key for each From domain, and align DMARC on DKIM, as Adobe recommends.
${textColor}.Underlined in orange: the class that tells Marketo what kind of editable region this is
What is Marketo's email template syntax?
Adobe documents it for Email Editor 2.0, the classic editor, on the Email Template Syntax page, last updated 7 October 2026. Four rules hold throughout:
- Class values such as
mktoTextare case sensitive. Attribute names such asmktonameare not. - Every
idmust be unique and use only letters, numbers, dashes and underscores. mktoNameis the label authors see in the editor.- The syntax works in templates and individual emails, and does nothing inside a snippet or a Rich Text token.
Editable elements: mktoText, mktoImg, mktoSnippet and mktoVideo
| Class | What the author can do | Notes |
|---|---|---|
mktoText | Edit rich text | Whatever sits inside the tag is the default. Older templates use mktEditable, which still works. |
mktoImg | Pick an image | On a div the author can also add a link. On an img they cannot. |
mktoSnippet | Choose an approved snippet | mktoDefaultSnippetId sets the first one. It cannot be turned into rich text. |
mktoVideo | Paste a YouTube or Vimeo URL | The email shows a thumbnail with a play button. |
Each is written with its class, an id and a mktoName. Adobe's examples:
<div class="mktoText" id="exampleText" mktoName="Main Body Text"> Optionally add default text for the editable text area. </div>
<div class="mktoImg" id="exampleImg" mktoName="Example Image" mktoImgLink="https://www.adobe.com"> <a><img style="border:10px solid red;"></a> </div>
<div class="mktoSnippet" id="unsubscribeFooter" mktoName="Unsubscribe Footer" mktoDefaultSnippetId="12"></div>
<div class="mktoVideo" id="productVideo" mktoName="Product Announcement Video"></div>Keep the empty <a> around the <img> in an image element. Adobe says it stops your inline styles being stripped when an author adds a link.
Variables: mktoString, mktoColor, mktoNumber, mktoBoolean, mktoList and mktoHTML
Variables are <meta> tags in the <head>. The author sets each value in the editor, and the template prints it wherever it writes ${textHeader}, ${textColor} and so on:
<meta class="mktoString" id="textHeader" mktoName="Text Header" default="Edit Me">
<meta class="mktoColor" id="textColor" mktoName="Main Text Color" default="#FFFFFF">
<meta class="mktoNumber" id="textFontSize" mktoName="Main Text Font Size" default="12" min="8" max="18" units="px" step="1">
<meta class="mktoBoolean" id="showFooter" mktoName="Show Footer BG?" default="false" false_value="transparent" true_value="black" false_value_name="NO" true_value_name="YES">
<meta class="mktoList" id="textFontFamily" mktoName="Main Text Font Family" values="Arial,Verdana,Times New Roman">
<meta class="mktoHTML" id="trackingPixel" mktoName="Add Tracking Pixel">mktoString escapes HTML unless allowHTML is true, and a <meta class="mktoImg"> returns only an image URL. A variable is global, shared by every copy of a duplicated module, unless you add mktoModuleScope="true".
Modules and the one container
A container is a table, tbody, thead, tfoot or td with class="mktoContainer". In a td container each module is a <table class="mktoModule">; in the others it is a <tr class="mktoModule">. A module needs an id and a mktoName. mktoActive="false" stops authors adding it, and mktoAddByDefault="false" leaves it off new emails.
Three rules on the same page catch most broken templates: one container per template, nothing but modules inside it, and later changes to a template's modules never reach emails already made from it.
Where does Marketo rewrite or detach your HTML?
- Colour values are lowercased. The classic editor lowercases
colorandbackground-colorvalues, so Adobe's template guide says to avoid camel case there. - Edit Code can detach an email. Changing anything outside an element or module, or a non-mkto attribute such as
styleon an element outside a module, breaks the email from its template. Editing inside modules does not. - Save as Template drops variable values and keeps the template's defaults.
- Past 500 emails on one template, Adobe suggests starting a new one, because re-approving it can cause performance issues.
What size should a Marketo email banner be?
Adobe publishes no banner size and no maximum width; your template sets the width. Put mktoImgWidth and mktoImgHeight on the image element so a banner goes in at your size. Adobe describes mktoLockImgSize, which defaults to true, as the attribute that unlocks the size. That reads both ways, so check whether authors can resize the image.
What changed with the Email Designer?
Adobe calls the editor after Email Editor 2.0 the Email Designer; its documentation does not call it Email Editor 3.0. It needs a subscription migrated to Adobe's identity system (IMS), and the classic editor will be retired with several months' notice, with no date given as of October 2026.
| Area | In the Email Designer |
|---|---|
| Classic templates | Must be imported, and then their variables are not available at the email level and their snippets stop working. |
| Your own HTML | Imported HTML stays in Compatibility mode, editable only as text, links and assets, until you run the HTML converter. |
An outer <table> | As the top layer it can lose its background and width. |
| Raw code | Advanced HTML mode does not validate, and you cannot save in it. |
| My Tokens | Templates do not support them. Put them in emails. |
| The API | Cannot edit Designer assets. |
From 23 May 2025 Adobe rolled out a Designer token format with no spaces in field names. That page gives the classic form and the new one:
{{lead.City:default=fallback}}
{%=lead.city ?: "fallback" %}Yet Adobe's Designer authoring page still shows {{lead.First Name:default=Friend}}. Insert one token from the picker and copy what it writes before you type tokens by hand.
How do Marketo tokens and default values work?
The Tokens Overview lists the token types:
| Token type | Example | Value comes from |
|---|---|---|
| Person | {{lead.First Name}} | Person fields, custom ones by display name |
| Company | {{Company.Company Name}} | Company fields |
| My Token | {{my.Event Date}} | A program or folder |
| Program | {{program.Name}} | The program |
| Campaign | {{campaign.name}} | The smart campaign |
| Trigger | {{trigger.Name}} | What triggered the campaign |
| System | {{system.date}} | Marketo |
| Member | {{member.webinar url}} | An integrated partner, such as a webinar service |
How do you set a default value for a Marketo token?
Add :default= and the text to print when the field is empty:
Hi {{lead.First Name:default=there}},The classic token dialog writes this from its Default Value field, which Adobe's personalization quick win says to always fill in; the Designer calls it fallback text. Adobe does not document what goes out when the field is empty and there is no default, so treat a token without one as a bug.
For more than a fallback, use dynamic content by segment or a Velocity email script token, which supports if and else.
What are My Tokens in Marketo?
My Tokens are {{my.}} tokens created on a program or folder, inherited by everything below it and overridable at a lower level. A Text token holds up to 524,288 characters. My Tokens do not resolve in emails sent from Sales Insight, though their defaults do, and nested tokens are not supported in batch campaigns.
Where do Marketo tokens not work?
| Place | Tokens |
|---|---|
| Subject, From, From Address, Reply-to | Yes, from the token icon beside each field (Adobe) |
| Preheader | Not from the email editor, only in your own template HTML (Adobe) |
| Link URLs | Yes. For a URL held in a My Token, type https:// outside the token or clicks are not tracked (Adobe) |
| Email script output | Print the whole <a> tag. Links printed inside a loop are not tracked (Adobe) |
| Snippets and Rich Text tokens | Template syntax does not run there (Adobe) |
Where do the unsubscribe and view-online tokens go?
{{system.unsubscribeLink}} and {{system.viewAsWebpageLink}} go in a link's URL; outside an anchor they are not clickable, and they cannot sit inside a My Token. Marketing emails, not operational ones, also get unsubscribe text appended from Admin, Email (Adobe). If you edit it, keep %mkt_opt_out_prefix% and mkt_unsubscribe=1&mkt_tok=##MKT_TOK##. Adobe's default:
<p><font face="Verdana" size="1">If you no longer wish to receive these emails, click on the following link: <a href="%mkt_opt_out_prefix%UnsubscribePage.html?mkt_unsubscribe=1&mkt_tok=##MKT_TOK##">Unsubscribe</a><br/></font></p>If your templates carry their own link, Adobe's way to remove the appended unsubscribe text is an HTML comment in its place, because the box cannot be saved empty.
How do you test Marketo tokens before sending?
Send Sample resolves tokens as the person you pick in its person drop-down, and My Tokens from the email's program (Adobe). Every address you enter is shown to the others, so send samples to your own mailbox. Test a person with an empty first name as well as one with a full one.
How do you set up SPF and DKIM in Marketo?
- SPFTXTHostexample.comValuev=spf1 mx ip4:[CorpIP] include:mktomail.com ~all
Or add
include:mktomail.comto the record you have. It counts for DMARC only with a branded return-path. - DKIMTXTHostm1._domainkey.example.comValue[TXT Value from Marketo]
Marketo shows the Host Record and TXT Value after you add the domain and choose a selector. It then signs with
d=example.com, which aligns with a From address at example.com. - DMARCTXTHost_dmarc.example.comValuev=DMARC1; p=none; rua=mailto:dmarc@example.com
Adobe's minimum is v=DMARC1; p=none. The rua address is where aggregate reports go.
- Email tracking linksCNAMEHostgo.example.comValue[the default branding domain Marketo assigned]
Then replace the generic entry in the Branding Domains table, under Admin, Email.
- Landing pagesCNAMEHostpages.example.comValue[MunchkinID].mktoweb.com
Puts landing pages on your domain. Neither CNAME takes part in SPF, DKIM or DMARC.
Underlined in orange: the selector, which you choose in Marketo and which the host name must repeat
SPF. Adobe gives this record for a domain with no SPF yet, with your domain and corporate mail server IP filled in:
[domain] IN TXT v=spf1 mx ip4:[corpIP] include:mktomail.com ~allIf you already have a record, add include:mktomail.com to it, since two SPF records on one name make SPF fail.
DKIM. Marketo signs with a shared signature until you set up a custom DKIM signature, as of October 2026 under Admin, Email, the SPF/DKIM tab, Add Domain. Enter your From domain, choose a selector and a key size (Adobe recommends 2048), publish the Host Record and TXT Value it gives you, then click Check DNS. The key must reach every nameserver for the domain. A From domain you have not added keeps the shared signature.
To change the selector or key size, delete the domain in Marketo and publish a new record. Adobe says your domain is not signed until the new record validates, which can take 24 to 48 hours. Delete the entry in Marketo before you change the DNS record, too.
Does Marketo DKIM align with DMARC?
Yes, once the custom DKIM domain is your From domain, and Adobe's setup guide recommends DMARC alignment on DKIM for Marketo. SPF rarely aligns. The default Return-Path is on Marketo's mailbox subdomains, which is why Adobe tells mail filters to allowlist *.mktomail.com, and SPF checks only that envelope domain. An aligned SPF pass needs a branded return-path, which Adobe Support sets up for dedicated IPs and its Trusted IP program. Strict SPF alignment is not supported.
Adobe's bare minimum DMARC record is v=DMARC1; p=none. Add a rua address, read the reports, then move to p=quarantine and decide on p=reject. The SPF, DKIM and DMARC explainer covers alignment in full.
How do you set up the Marketo tracking domain CNAME?
Marketo asks for two CNAMEs, both in the figure above: a landing page host pointing at [MunchkinID].mktoweb.com, and an email tracking host pointing at the default branding domain Marketo assigned you (Adobe). Then edit the generic entry in Branding Domains under Admin, Email, and ask Adobe Support for an SSL certificate, which can take up to 3 business days. Use a CNAME: a branding domain set up as an A record locks you out of adding more.
How do you check Marketo authentication once it is live?
After Check DNS passes, send a sample to your own mailbox. Its DKIM-Signature header should carry d= with your domain and s= with your selector, and Authentication-Results should show dmarc=pass. The header analyzer reads those headers for you, and the DKIM checker looks up a key by its selector.
The free editor exports Marketo template HTML with this syntax written in: one mktoContainer, every row a mktoModule, every heading and text block mktoText, and tokens with :default= fallbacks. Before a send, the free mail-merge preview reads a draft against a CSV of your list and flags every empty merge field, in its own tag syntax rather than Marketo's, and the email domain checker reports SPF, DKIM and DMARC together. Draftship also builds and runs outbound inside a client's own platform.
Sources
- experienceleague.adobe.comclass names mark what an author may edit
- experienceleague.adobe.comTo authenticate, add include:mktomail.com to SPF, publish a custom DKIM key for each From domain, and align DMARC on DKIM, as Adobe recommends
- experienceleague.adobe.comThe classic editor lowercases color and background-color values, so Adobe's template guide says to avoid camel case there
- experienceleague.adobe.combreaks the email from its template
- experienceleague.adobe.comAdobe calls the editor after Email Editor 2.0 the Email Designer; its documentation does not call it Email Editor 3.0
- experienceleague.adobe.comIt needs a subscription migrated to Adobe's identity system (IMS), and the classic editor will be retired with several months' notice, with no date given as of October 2026
- experienceleague.adobe.comtheir variables are not available at the email level
- experienceleague.adobe.comImported HTML stays in Compatibility mode, editable only as text, links and assets, until you run the HTML converter
- experienceleague.adobe.comAdvanced HTML mode does not validate, and you cannot save in it
- experienceleague.adobe.comFrom 23 May 2025 Adobe rolled out a Designer token format with no spaces in field names
- experienceleague.adobe.comYet Adobe's Designer authoring page still shows {{lead.First Name:default=Friend}}
- experienceleague.adobe.comThe Tokens Overview lists the token types
- experienceleague.adobe.comThe classic token dialog writes this from its Default Value field, which Adobe's personalization quick win says to always fill in; the Designer calls it fallback text
- experienceleague.adobe.comdynamic content by segment
- experienceleague.adobe.comFor more than a fallback, use dynamic content by segment or a Velocity email script token, which supports if and else
- experienceleague.adobe.comMy Tokens are {{my.}} tokens created on a program or folder, inherited by everything below it and overridable at a lower level
- experienceleague.adobe.comYes, from the token icon beside each field
- experienceleague.adobe.comFor a URL held in a My Token, type https:// outside the token or clicks are not tracked
- experienceleague.adobe.comoutside an anchor they are not clickable
- experienceleague.adobe.comMarketing emails, not operational ones, also get unsubscribe text appended from Admin, Email
- experienceleague.adobe.comremove the appended unsubscribe text
- experienceleague.adobe.comSend Sample resolves tokens as the person you pick in its person drop-down, and My Tokens from the email's program
- experienceleague.adobe.comthis record for a domain with no SPF yet
- experienceleague.adobe.comset up a custom DKIM signature
- rfc-editor.orgSPF checks only that envelope domain
- experienceleague.adobe.comedit the generic entry in Branding Domains
- experienceleague.adobe.comlocks you out of adding more