Gmail Schema Tags | Community
Skip to main content
June 19, 2014
Solved

Gmail Schema Tags

  • June 19, 2014
  • 8 replies
  • 4884 views
Has anyone had any luck adding the new Gmail schema code (https://developers.google.com/gmail/actions/reference/offer) to emails. It seems the code is getting stripped because it does not validate.

Cheers.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Justin_Cooperm2
It's not stripping it when I do that.

When you click "Show original" in gmail, you don't see the script present?

8 replies

New Participant
November 4, 2018

Hi everyone

I tried to add this code to our double opt in confirmation email:

<script type="application/ld+json">

{

  "@context": "schema.org",

  "@type": "EmailMessage",

  "potentialAction": {

    "@type": "ViewAction",

    "url": "(redacted)",

    "name": "Confirm subscription"

  },

  "description": "Confirm your subscription to G Adventures. Without this confirmation, you won't be subscribed to our email newsletter."

}

</script>

I placed it just before the </body> tag as per this article: How to Use Gmail Actions in Your Email Program | SendGrid . But when I tried to approve the email, I got the error "Marketo does not allow javascript or scripts in email" or something similar to that. Is there something I've missed in the thread above? @Justin Cooperman​, any ideas?

Thanks!

June 23, 2014
My mistake. It's there. Thank for checking on that.
Justin_Cooperm2
Justin_Cooperm2Accepted solution
New Participant
June 23, 2014
It's not stripping it when I do that.

When you click "Show original" in gmail, you don't see the script present?
Yoav_Guttman1
New Participant
June 22, 2018

@Justin Cooperman​ - is there any step-by-step guide you have come across to add Google schema.org to Marketo emails?

Justin_Cooperm2
New Participant
June 22, 2018

It should work fine if you just paste the script into an email template in Marketo or to an individual email. This thread was pre-Email 2.0 and it shouldn't be stripping much anymore.

Justin

June 20, 2014
Tried this when it first came out with no luck. Not sure if Marketo is working on this or not.
June 20, 2014
Good idea. I see it leaves the script in tact upon saving the email, which is progress. But it looks like the script gets stripped when it gets sent, which makes sense since scripts can create security holes. I tried using the Microdata fromat which relies on div and link tags rather than script, but it looks like those are getting stripped too. I suspect the validator is at work there but I can't prove that. :)

Cheers.
Justin_Cooperm2
New Participant
June 19, 2014
Did you paste the script in via Email Actions > HTML Tools > Replace HTML?

Seems to not strip it out when I test it that way...
June 19, 2014
Hi Justin, Thanks for the reply. Yes, we're all set with Google. If we send a test outside of Marketo, the data is good. Our issue is that the code never makes it to Gmail when we send from Marketo because it's stripped altogether. Thanks.
Justin_Cooperm2
New Participant
June 19, 2014
Did you register with Google? Also looks like you'll need to have SPF/DKIM setup...

https://developers.google.com/gmail/actions/registering-with-google