google-schemas - 在我的电子邮件版本中添加架构代码时遇到问题
问题描述
我在将架构代码添加到我的电子邮件版本中时遇到了困难 - 当我在 Gmail 中测试电子邮件时,没有显示任何内容。
我已尝试测试我的电子邮件,但没有看到架构信息。
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<script type="application/ld+json">
[{
"@context": "http://schema.org/",
"@type": "Organization",
// WARNING: Before sending email, either point the logo
// at your own image or delete the logo annotation.
//
// If showing a logo, we recommend using an https URL.
// It's not a requirement today, but may be in the future.
"logo": "http://media.bobsdiscountfurniture.com/7843/Miscellaneous/little -bob-profile.jpg"
},{
"@context": "http://schema.org/",
"@type": "EmailMessage",
// Alternative subject line.
"subjectLine": "It's Two for Tuesday!"
},{
"@context": "http://schema.org/",
"@type": "DiscountOffer",
"description": "Two items - one great price!",
"discountCode": "",
"availabilityStarts": "2019-06-09T06:51:45-07:00",
"availabilityEnds": "2019-06-12T06:51:45-07:00"
},{
// Promotion card with single image.
// We recommend using an https URL.//
// Sample image is 538x138, 3.9 aspect ratio
"@context": "http://schema.org/",
"@type": "PromotionCard",
"image": "https://productimages.mybobs.com/20052909/20052909_hero_wide.pn g"
}]
</script>
</head>
<body>
<p>Email Body</p>
<p>Line 2</p>
</body>
</html>
我希望在我的测试电子邮件证明中显示我的 Schema 代码,以便我可以发送给 Google,以便获得授权将 Schema 编码定期合并到我的电子邮件中。
解决方案
您可以参考有关电子邮件标记的官方文档,并通过向自己发送电子邮件进行自我测试。另请记住,对于您的示例电子邮件的内容,强烈建议使用与您的架构代码相同的生产设置。
推荐阅读
- python-3.x - 对 DataFrame 中的每个项目执行计算
- mysql - 加速使用 Group By 和 Order By 的多表 Mysql 查询
- python - Tkinter,如果从 CSV 文件中删除了值,则删除冗余行
- reactjs - 在 Jest 中模拟回调 ref
- php - PHP在LEFT Join上仅从MySQL字段返回空值,而MySQL终端按预期运行
- azure - 使用附加列刷新 powerBI 数据
- sql-server - 这个检查约束是什么意思(NOT [EXIST_code] like '%[^-0-9A-Z_/&$!]%')
- python - 如何计算 Pandas 中每组的行数?
- ios - 如果应用程序已经有一些其他 pod 依赖项,如 Almofire、SwiftJSON 等,如何创建我们自己的 Cocoapods
- c# - Xamarin - 无法部署到设备