Gmail的快速操作按钮实现

时间:2013-05-20 00:46:14

标签: gmail

如何在电子邮件模板上实现Gmail的快速操作按钮? 我的目标基本上只关注拥有Gmail帐户的用户。 我看到有关gmail快速操作按钮的消息,我想知道如何实现这些按钮,以便gmail上的新闻通讯/电子邮件显示快速操作按钮。这肯定会增加用户对电子邮件传递的转换。

1 个答案:

答案 0 :(得分:4)

我在这里找到了解决方案:http://googleappsdeveloper.blogspot.com.br/2013/05/introducing-actions-in-inbox-powered-by.html。它似乎只需要在电子邮件模板中添加JSON-LD标记:

<script type="application/ld+json">
{
  "@context": "schema.org",
  "@type": "Movie",
  "name": "The Internship",
  ... information about the movie ...
  "action": {
    "@type": "ConfirmAction",
    "name": "Add to queue",
    "actionHandler": {
      "@type": "HttpActionHandler",
      "url": "https://my-movies.com/add?movieId=123",
      "method": "POST",
    }
  }
}
</script>