Adding a promotion image in Gmail | Community
Skip to main content
Michael_McGowa1
Level 3
February 5, 2019
Question

Adding a promotion image in Gmail

  • February 5, 2019
  • 1 reply
  • 5037 views

Hi everyone,

I am trying to implement a promotional image on Gmail as described in this article here. https://blog.returnpath.com/promoting-meaningful-communication-with-gmail-promotions-update/

This seems to bypass the issues talked about in this thread here https://nation.marketo.com/thread/40803-how-do-we-get-our-company-logo-to-show-in-gmail

I know that Marketo does not allow JSON code in the email so I am using microdata in the body tags to try an implement this.

Using Litmus' Gmail Promotions Builder tool https://litmus.com/community/gmail-promotions-builder it gave me this code

(Imagepath is the URL to the image hosted in our Marketo instance)

<div itemscope itemtype="http://schema.org/Organization">

<meta itemprop="name" content="Gmail" />

<meta itemprop="logo" content="https://imagepath/image.png" />

</div>

Yet, when I send an email to my Gmail account, the logo is not showing up. When I check the code in the template I find that Marketo keeps changing the code in the first line to

<div itemscope="" itemtype="http://schema.org/Organization">

Would this be enough to stop the image from rendering? Has anyone had success in implementing this? Any help would be appreciated.

Michael

1 reply

Casey_Grimes2
Level 10
February 5, 2019

Hi Michael,

Known issue—right now, Marketo is stripping out any microdata, whether it's done with attributes or LD-JSON. Probably need to file an idea about it at some point.

SanfordWhiteman
Level 10
February 5, 2019

Output it from a Velocity token.

Michael_McGowa1
Level 3
February 5, 2019

Hi Sanford

Trying to write the Velocity script, I keep getting validation errors when I try to approve it. Here is my code that I have in the token

#set (myItemScope == "itemscope")

#set (myItemType == "schema.org/Organization")

#set (myItemProp == "meta itemprop=name content=Gmail")

#set (myItemPropLogo == "meta itemprop=logo content=imagepath/image.png ")

<div

${myItemScope}

${myItemType}

${myItemProp}

${myItemProp}

</div>

I am new to Velocity so I know I am missing a lot. Any thoughts?