我在下面添加了代码,用于执行电子邮件的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>
答案 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>
你应该得到以下按钮:
您还可以查看文档中的示例:
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>