电子邮件查看操作MarkUp无效

时间:2015-08-12 12:17:51

标签: google-schemas

我在下面添加了代码,用于执行电子邮件的ViewAction标记,但它无效。帮我解决这个问题。

我们在{1}内部传递了URL,其值可以设置。

<script type="application/ld+json">
{{
    "@context": "http://schema.org",
    "@type": "EmailMessage",
    "potentialAction": {{
    "@type": "ViewAction",
    "url": "{1}",
    "name": "Book now"
    }},
    "description": "Book your bus seat now"
}}
</script>

2 个答案:

答案 0 :(得分:0)

尝试以下方法:

<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "EmailMessage",
    "potentialAction": {
    "@type": "ViewAction",
    "url": "http://example.com",
    "name": "Book now"
    },
    "description": "Book your bus seat now"
}
</script>

你应该得到以下按钮:

enter image description here

您还可以查看文档中的示例:

https://developers.google.com/gmail/markup/reference/go-to-action#view_action

答案 1 :(得分:0)

<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "EmailMessage",
    "potentialAction": {
    "@type": "ViewAction",
    "url": "http://example.com",
    "name": "Book now"
    },
    "description": "Book your bus seat now"
}
</script>