Gmail Promo Code | Community
Skip to main content
Jorge_Luis
Level 1
February 3, 2020
Question

Gmail Promo Code

  • February 3, 2020
  • 1 reply
  • 2433 views

Hello,

 

I am trying to add a gmail promo code / image / logo. I heard you had to use velocity scripting because Marketo doesn't allow you to put a Json file in the code because of the script tag. Can anyone please help me. I have the Json code and Microdata code. 

 

Thank you

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
February 3, 2020

Simply paste the markup inside a new Velocity token.

 

When you're using Velocity for such purposes (leaning on the fact that Velocity output is not escaped) that's all you need. See also:

 

https://nation.marketo.com/t5/Product-Blogs/Even-when-Velocity-isn-t-doing-anything-it-s-doing-something/ba-p/242032

Jorge_Luis
Level 1
February 4, 2020

Hello, 

 

Thank you for the reply. I'm still confused. Do i have to create a custom object or a custom field and then pass it through velocity script?  I attached the code below as well. 

 

Thank you again

 

<div itemscope itemtype="http://schema.org/Organization"> <meta itemprop="name" content="Gmail" /> <meta itemprop="logo" content="https://www.designevo.com/res/templates/thumb_small/brown-circle-and-chocolate-coffee.png " /> </div> <div itemscope itemtype="http://schema.org/EmailMessage"> <meta itemprop="subjectLine" content="Hello World" /> </div> <div itemscope itemtype="http://schema.org/PromotionCard"> <meta itemprop="image" content="https://www.designevo.com/res/templates/thumb_small/brown-circle-and-chocolate-coffee.png " /> </div>

 

SanfordWhiteman
Level 10
February 4, 2020

You don't use any fields or objects (thus nothing needs to be checked in the tree in Script Editor).

 

Text added in a Velocity token, without any Velocity methods/operators/references, is just printed out verbatim. (This is how Velocity works in general, not just in Marketo.)