首页 > 解决方案 > 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(如上所述)和urlitemprops,正如我在其他地方看到的那样,文档和现实之间可能存在一些混淆,甚至尝试将它们都添加。当我在 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

标签: gmailhtml-emailgoogle-schemas

解决方案


您是否联系过 google 以获得 CTA 按钮的批准?这是在 Gmail 上显示按钮的关键步骤。


推荐阅读