8 Tips for Creating Marketo 2.0 Email Templates From Scratch


Over the past couple of months, I have been creating email templates using the new(ish) email template syntax in Marketo and I’ve learned a couple tricks along the way. To save you from some headaches, here are 8 tips that I’ve learned from creating Marketo 2.0 email templates from scratch.

1. Complete rendering testing first

Before you turn your email template into a Marketo 2.0 email friendly version, make sure your email renders correctly on all devices first. Once you start adding Marketo-specific code, such as variables, it becomes more difficult to test your email template by previewing it in your browser or in an email rendering tool.

2. Map out the sections

Take the time to plan out what sections should be modules, color pickers, etc, should be in your template.

3. Understand global vs local variables

Creating global variables will allow all modules that use that variable to be updated. Creating local variables will allow each individual module to have a different value. So, for example, let’s say you have 2 call-to-action buttons in your email and you want to be able to update the background color of the buttons using a color picker variable. You can set it to be global, meaning when you use the color picker it will update BOTH buttons in the email or you can set it to be local, meaning the 2 buttons can be different colors.

Global variable example:

Local variable example:

4. Test along the way and get to know the error messages

When you copy and paste your template HTML into Marketo, you will receive an error message if your syntax is incorrect. If you have never created Marketo 2.0 email templates before, I suggest you try uploading the HTML at a couple points in your development process. For example, I usually add all the modules first and then upload the code to Marketo and try to approve it. If any of my modules are invalid then I will receive an error message.

So, what are common error messages and how do you fix them? Here are some that I’ve come across.

Error: Invalid Module

The issue

Containers can only contain modules and no other elements. So, if you receive this error it means there’s an HTML element in the container that isn’t a module.

The fix

You can create the element as a module or find the HTML and remove it, but finding the offending element can be a bit tricky, so here’s a tip.

Open your email template HTML in Chrome and activate Developer Tools. Under the elements tab find your container (mktoContainer) element and make sure everything under that has a class of mktoModule. If there’s an element with now mktoModule present, like the example below, then it needs to be removed or turned into a module.

Error: No variable with this id declared

The issue

You’re trying to reference a variable that doesn’t exist.

The fix

Declare the variable within the HEAD section of you email template or double check that the variable is not misspelled. Remember these are case sensitive.

5. Modifications to a template might not update the email

When you make an update to the email template your changes might not be reflected in any emails that are currently using the template. This happens when you edit any content within a module. To view your changes delete the module from the email and drag-and-drop it back in. Any updates to elements other than modules should update in your email automatically once the template is approved.

6. Use a ‘list’ instead of a color picker

Adding a color picker to an email template opens up endless possibilities of the colors your users can choose when creating an email. The color picker syntax doesn’t have the option to restrict the color picker element to only your brand’s colors, so instead, you can use a list element to define your brand’s colors.

7. Create global variables for your UTM parameters

You can create global variables to append UTM tracking to all the links in your email.

8. Variables don’t automatically copy over to the text version

Unfortunately, variables don’t automatically copy over to the text version of a 2.0 email. So, if you have links or text defined as a variable you will need to manually add it to the text version of the email. You can also use MailChimp’s HTML to Text Email Converter to generate a text version of your email, without the manual work.

Vote for this idea on the Marketo Community

Have questions or tips you want to share?

Send them to me via email, send me a tweet @jennamolby, or leave a comment

Related Posts

  • 11/06/2019
    How to Turn Any Email Template into a Pardot Email Template

    Do you know you can turn any email template into a Pardot email template? With a couple of modifications to the HTML, you can have a fully functional Pardot email template which allows you to remove, edit and duplicate sections. In this tutorial, I will show you how to take any free, responsive email template and turn it into a Pardot email template.

  • 06/12/2018
    Creating Pardot Email Templates: Common Questions & Answers

    Can my Pardot email be responsive? Why doesn’t my background image appear in Outlook? Can Pardot emails be drag & drop? I get asked these questions a lot from Pardot users and see them posted frequently in the Trailblazer Community. Let’s dive into these questions as well as other common Pardot email template questions.

  • 24/10/2018
    How to Create a Net Promoter Score Survey in Pardot

    Learn how to build a net promoter score (NPS) survey directly in Pardot. I will show you how to create an NPS survey that asks the recipient to give you a score from 1 – 10 using an in-email rating that directs them to a Pardot landing page to collect more information.

9 comment(s)
  • Donna

    08/09/2019 at 7:55 pm

    Hi Jenna, Thanks for the post! How do do you make sure your email renders correctly on all devices first. My email renders fine in the outlook email client but it doesn't in Chrome. More specifically the button in my email has an issue showing up in the browser and I'm trying to figure out why. Thanks

    • Jenna Molby
      to Donna

      10/09/2019 at 10:21 am

      Hi Donna, Creating emails that render correctly in all email client can be tricky. Without seeing your email it's not possible for me to troubleshoot your issue. Cheers, Jenna

  • Nikki

    08/03/2018 at 11:42 am

    Hi Jenna - I would like to use the UTM hack so that all of my links are tracked in GA for the 2.0 templates. Where in the templates do I add this: code <meta class=”mktoString” id=”link-variable” mktoName=”URL” default=”#” mktoModuleScope=”true”> <meta class=”mktoString” id=”utm-tag” mktoName=”UTM” default=”?utm_source=marekto&utm_medium=email&utm_campaign={{program.Name}}” mktoModuleScope=”true”> I am sure what to do with this one? <a href="${cta-url}?utm_source=${utm-source}&utm_content=${utm-content}&utm_medium=${utm-medium}">CTA TEXT</a> Can I use this one instead? <a href=”${link-variable}${utm-tag}”> What is the difference and what do I need to update? Thank you!

    • Jenna Molby
      to Nikki

      08/03/2018 at 12:56 pm

      Hi Nikki, Add this code to the HEAD section of your template <meta class="mktoString" id="utm-source" mktoModuleScope="false" mktoName="UTM Source=" default=""> <meta class="mktoString" id="utm-content" mktoModuleScope="false" mktoName="UTM Content=" default=""> <meta class="mktoString" id="utm-medium" mktoModuleScope="false" mktoName="UTM Medium=" default=""> and add this code where you want the link to appear: <a href="${cta-url}?utm_source=${utm-source}&utm_content=${utm-content}&utm_medium=${utm-medium}">CTA TEXT</a>

  • Liz Davalos

    02/11/2017 at 10:00 am

    I'm curious how you handle utm parameters on images without losing the image picker?

    • Jenna Molby
      to Liz Davalos

      02/11/2017 at 10:31 am

      Hi Liz, I create the image links as a variable and then I use the <img> syntax to create an editable image instead of wrapping the img in a DIV. Using the IMG syntax does not allow end users to add a link to their image, forcing them to input into the variable instead. The IMG syntax looks like this <img class="mktoImg" id="exampleImg" mktoName="Example Image">.

    • Liz Davalos
      to Jenna Molby

      02/11/2017 at 2:00 pm

      Thank you!!! No one had this answer, I've been looking for hours.

  • Shawn

    26/10/2017 at 11:37 am

    Great tutorial! I can't get my images to re-size in marketo based on the code. What's needed to have the images auto re-size to your container and also stay responsive?

    • Jenna Molby
      to Shawn

      26/10/2017 at 1:13 pm

      Hi Shawn, Glad you found it helpful! To make your image responsive you can add CSS like this: img {width:100%;max-width:400px;}. More information and alternative techniques can be found here: https://stackoverflow.com/questions/15458650/make-an-image-responsive-simplest-way

Leave A Comment

Your email address will not be published. Required fields are marked *

About Me

Welcome to my blog, where I share, tips, tricks, thoughts and solutions that I learn in my daily life as a Marketing Operations leader.

Most Commented
Popular Posts