Email Variant

Back to home

Random Marketo Email Template Tidbits

September 23, 2024

After spending years in the trenches of email template design, I’ve picked up more than a few nuggets of wisdom (some the easy way, others... not so much). Whether you're just dipping your toes into Marketo or you’re a seasoned pro, there are always those little things that can trip you up. So, in the spirit of saving you a few headaches (and possibly some panicked Slack messages), I’m dropping a knowledge bomb of random Marketo email tidbits—lessons learned, tricks discovered, and things you definitely want to keep an eye on when you’re building those templates.

  • Variables and Text-Only - If you decide to make any text in your email a variable just know that in the text-only version of the email the text that gets displayed is the variable id and not the text you inputted. So if you have a variable for “btn_text” then the text only version won’t show the default value of “button text” it will display “$btn_text”. Here is what I am talking about:


    Variable Definition:

    <meta mktoModuleScope="true" class="mktoString" id="Button-Text" mktoName="Button Text" default="ACT NOW" />

    Text-Only Email:

    As you can see in the above screenshot, you'd expect to see 'ACT NOW' as the text for the button but instead you just see the id.

  • Clearing Content from a Module - In the email build editor when you hover over any editable element it will give you a Gears icon with a dropdown of options for that element, one of them being ‘Clear Content’. While this does clear the content, it does not delete the element aka the code associated with that content which can cause spacing issues and other rendering problems.


    Here is a quick video demonstrating what I am talking about - you will see after 'Clear Content' gets selected and you switch over to the code view you will see the empty <div> with a surrounding <tr> and <td>.


  • Be careful with buttons - a word of warning both for developers and end users! I have seen some weird things happen with button text in Marketo. If you have made button text editable for your end users, my suggestion is to have them switch to the HTML view within the Rich Text Editor when editing text to make sure they are only editing text. Updating button text directly in the Rich Text Editor can add non-breaking spaces, clear styling, and cause the end user to have to re-drag in the module and start over.  


    Here is a quick demo using one of Marketo's email templates showing the difference between editing directly in the Rich Text Editor vs editing from the HTML view:

  • mktoText Elements - This elements opens up a rich text editor for the end user to edit content. I always recommend if possible, to also edit content from the HTML view within the Rich Text Editor to avoid any issues OR check the code version after the end user adjusts text if they are seeing bugs as I have found random <p> tags or <br/> tags get created when making text updates from the UI.

  • mktoImg Elements - For mktoImg elements there are attributes you can add to the <img> tag that allow you as the developer to lock the image sizing and styles which I highly recommend as most of the time your template requires images to be inserted at a set width so as not to break anything. These are the attributes I’d recommend using: mktoLockImgSize and mktoLockImgStyle. You can set both of these to “true” which disables them from being edited or removed.

  • Marketo email testing - remember that unlike testing a normal html email template, you are dealing with a unique templating language inside of Marketo that requires another layer of testing. Whether you take that on as a developer or add a step to your QA process where you involve a marketer to play around with the template as they create a new email with it, you’ll definitely need to test how your variables, modules, and elements all work for the end user. This step can often be forgotten and it’s best to make sure you know both the basic email code and Marketo code are all working as expected before declaring the template production-ready.

At the end of the day, building Marketo email templates is a mix of art, science, and a whole lot of patience. The little things matter, and paying attention to these details can save you—and your team—hours of troubleshooting down the road. Whether it's a simple adjustment to a module or a reminder to always test across different clients (seriously, don’t skip this!), each lesson learned adds up to a smoother workflow and better results. So, keep experimenting, keep learning, and most importantly—keep having fun with it. Your future email campaigns will thank you.