如何将结构化数据等PayPal添加到Google电子邮件标记中?

时间:2015-09-14 22:32:28

标签: paypal schema.org google-schemas google-inbox

我想知道如何实现与PayPal相同的电子邮件结构。

看起来像这样(在Google的收件箱中):

  

Email, showing PayPal logo, and reading 'Receipt for Coursera, Inc.', listing amount, issuer, date and confirmation number

但我在这里找不到正确的类型:https://developers.google.com/gmail/markup/reference/

知道如何实现类似PayPal的标记吗?

1 个答案:

答案 0 :(得分:0)

使用schema.org/Invoice和schema.org/PayAction,我能够获得您从PayPal发布的电子邮件结构。它还产生了一个" View Bill"按钮,仅显示在收件箱而非Gmail中。看看我下面的示例脚本。 email markup tester似乎喜欢它,没有发现错误。尝试使用此Gmail Schema TesterApps Script与您的Gmail帐户一起发送。



 <script type="application/ld+json">
[
{
    "@context": "http://schema.org",
    "@type": "Invoice",
    "description": "January 2015 Acme Bill",
    "url": "https://www.americanexpress.com",
    "accountId": "xxxx-xxxx-xxxx-1234",
    "potentialaction": {
      "url": "https://example.com",
      "@type": "PayAction"
    },
    "paymentDue": "2020-01-30",
    "minimumPaymentDue": {
      "@type": "PriceSpecification",
      "price": "$15.00"
    },
    "totalPaymentDue": {
      "@type": "PriceSpecification",
      "price": "$200.00"
    },
    "paymentStatus": "payment due",
    "provider": {
      "@type": "Organization",
      "name": "Acme Bank"
 }
}
]
    </script>
&#13;
&#13;
&#13;

你应该得到这个:

enter image description here