Abhishek Chandra

Embed Tokens in Landing Page Template

Blog Post created by Abhishek Chandra on Nov 28, 2019

As we know that template, tokens and snippet are few of the most important elements in Marketo and there are a lot of opportunities that can be explored with the help of these elements. We can do personalization, customization, make dynamic content, make efficient production process etc, with the help of these elements.

 

One important aspect which we can achieve very easily with these elements is embedding tokens in landing page or email templates and make life of execution team much easier. We will have many benefits by embedding tokens in templates, a few of them are:

  • We do not have to worry about the formatting from brand stand point, look and feel will remain the same
  • Time to build an email or landing page will be reduced drastically, team members just have to update the tokens and thats it, our asset is ready to go
  • As an admin we can decide on the access, especially when we are dealing with vendors or having big teams

 

When we think of embedding tokens in templates, it appears to be a daunting task and anyone who does not have coding or programming background find it quite difficult. So I thought of sharing an easy way of including the tokens in the templates, though it will still require understanding of HTML and CSS but only a basic understanding will work.

 

Take any available guided landing page template and look at the code. The code consists of three basic parts Marketo Bootstrap CSS, Marketo variables and Marketo Elements, go through the code and find out the code for elements and variables. Code can be identified by simple search, in case you do no have any knowledge of HTML then it will take some hit and trial to find out the exact element or variable.

 

Once the element is identified one can either delete it or modify it, for example I just updated the code as

 

<div align="center"><div align="left"  style="width:80%; padding:20px 0px 20px 20px;"><img class="mktoImg" id="logo" mktoName="logo" src="{{my.HeaderLogo}}" ></div>

 

Include the image class "mktoImg" (highlighted in red) and in image source I have included the token (underlined text).

 

Similarly we can also include the HTML code and call the Marketo class

 

<img class="mktoImg" id="UniqueID" mktoName="lopsact-image" src="{{my.LPHeroBanner}}" alt="lopsact" width="100%"> 

 

As a basic example i included four tokens in landing page template, and the code looks like: (pardon me for not highlighting the syntax)

 

<div align="center"><div align="left" style="width:80%; padding:20px 0px 20px 20px;"><img class="mktoImg" id="logo" mktoName="logo" src="{{my.HeaderLogo}}" ></div></div>
<img class="mktoImg" id="UniqueID" mktoName="lopsact-image" src="{{my.LPHeroBanner}}" alt="lopsact" width="100%">
<div class="container" style="margin-top:10px;">
<div class="col-lg-6 col-md-6 centered" >
<div align="left" >
{{my.eventdescription:default=edit me}}<br><br>
{{my.EventVenue:default=edit me}}
</div>

 

By including the above code I have embedded the tokens in template and same have been created at a folder to be included in a program:

 

 

And by updating these tokens in the program I am able to create the landing page and the same can be used as a template and clone whenever a landing page is required.#

Outcomes