gmail - ViewAction 微数据未在 GMail 中显示 CTA 按钮
问题描述
我正在尝试使用以下代码在电子邮件中添加GMail“Go-To Action” CTA 按钮:
<div itemscope itemtype="http://schema.org/EmailMessage">
<meta itemprop="description" content="Activate Your Account" />
<div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="target" href="https://path.to/activate" />
<meta itemprop="name" content="Activate Account" />
</div>
</div>
我已经尝试使用target
(如上所述)和url
itemprops,正如我在其他地方看到的那样,文档和现实之间可能存在一些混淆,甚至尝试将它们都添加。当我在 GMail 中单击“显示原件”时,我看到了下面显示的内容,但收件箱中没有显示任何按钮。
----==_mimepart_abc123
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>
<div itemscope itemtype="http://schema.org/EmailMessage">
<meta itemprop="description" content="Activate Your Account">
<div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="target" href="https://path.to/activate">
<meta itemprop="name" content="Activate Account">
</div>
</div>
target only
</body></html>
----==_mimepart_abc123
解决方案
您是否联系过 google 以获得 CTA 按钮的批准?这是在 Gmail 上显示按钮的关键步骤。
推荐阅读
- sapui5 - 检查“找不到文件”或解析错误
- javascript - 终端中出现“属性不存在”错误,但 Chrome 控制台中没有 - Nuxt/Prismic
- kotlin - 将我的图书馆服务与我的应用程序通信的最佳方法
- codeigniter - 在codeigniter 4中从正则表达式调用类
- python - Django - 将 Excel 文件保存到模型的 FileFild
- google-api-client - 谷歌文档 ai 不解析表单
- php - PHP从数组中删除空字符串
- javascript - 是否有更简单/更有效的方法来更新此 json 文件中的值?
- javascript - 如何使用javascript再次关闭下拉菜单?
- git - 合并时(需要在纯 git + diff 工具中审查的代码)如何(真正)在来自其他分支的每一行更改的代码上强制冲突?