【发布时间】:2020-08-04 20:24:26
【问题描述】:
我正在尝试使用以下代码在电子邮件中添加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
【问题讨论】:
-
这是 AMP 电子邮件吗?因为这看起来与您通常在电子邮件中放入的内容完全不同
标签: gmail html-email google-schemas