Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gmail Inbox View Action - "A value for the url field is required."

I'm trying to get the markup correct for Gmail inbox actions for resetting a password. I'm using the Email Markup Tester.

My markup looks like this:

<div itemscope itemtype="http://schema.org/EmailMessage">
  <meta itemprop="description" content="Reset password instructions"/>
  <div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction">
    <meta itemprop="target" content="https://www.example.com/users/password/new?token=123"/>
    <meta itemprop="name" content="Reset Your Password"/>
  </div>
  <meta itemprop="description" content="Visit our site to reset your password."/>
</div>

The above markup returns the error:

A value for the url field is required.

But I can't figure out how that url field should be inserted into the markup. Even Google's example fails their markup validator.

like image 210
Arel Avatar asked Aug 04 '16 14:08

Arel


1 Answers

(Not sure if this is just an error with their testing tool, or if this is really a new requirement that’s not documented.)

You could provide the url property in addition to the target property. Also note that you have to use a link element (instead of a meta element) if the value is a URL.

So it would be:

<link itemprop="target url" href="https://www.example.com/users/password/new?token=123" />

This reports no errors in Google’s email markup tester.

like image 148
unor Avatar answered Nov 11 '22 08:11

unor