电子邮件促销活动参考文档
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本页介绍了用于为宣传电子邮件添加注释的类型及其关联的属性。这些类型和属性以 JSON-LD 的形式包含在促销电子邮件的标头中。
如需了解详情,请参阅电子邮件标记入门指南。
组织
借助 Organization
类型,您可以指定要包含在促销活动中的徽标。
DiscountOffer
借助 DiscountOffer
类型,您可以创建特惠注释,以宣传优惠的详细信息,例如折扣代码或到期日期。
借助 PromotionCard
类型,您可以添加宣传内容的直观预览。
名称 |
类型 |
说明 |
image |
ImageObject 或 网址 |
必需。电子邮件的图片预览,格式为 PNG 或 JPEG。 支持的宽高比为 4:5、1:1 和 1.91:1。系统会自动对图片进行中心剪裁。请参阅与图片相关的最佳实践。 对于商品轮播界面,每个 PromotionCard 都必须使用独一无二的图片,且宽高比相同。 |
url |
网址 |
必需。促销活动的网址。用户点击电子邮件中的 image 后,会被定向到此网址。 |
headline |
文本 |
可选。1 到 2 行对促销活动的说明,将显示在 image 下方。 |
price |
文本 |
可选。促销活动的价格。如果您设置了 discountValue ,price 会显示为应用折扣前的促销活动原价。 |
priceCurrency |
文本 |
可选。价格所用币种,采用由 3 个字母表示的 ISO 4217 格式,例如 USD 。确定随价格一起显示的货币符号。 |
discountValue |
文本 |
可选。从 price 中扣除的金额,以显示调整后的价格。调整后的价格会显示在原价旁边。 例如,如果 discountValue 设置为 25 、price 设置为 100 ,并且 priceCurrency 为 USD ,则调整后的价格会显示为 $75 。 |
position |
文本 |
可选。卡片在轮播界面中的位置。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-24。
[null,null,["最后更新时间 (UTC):2025-03-24。"],[],[],null,["# Email promotions reference\n\nThis page describes the types used to annotate promotional email and their\nassociated properties. These types and properties are included in a\npromotional email's header as\n[JSON-LD](/workspace/gmail/markup/reference/formats/json-ld).\n\nTo learn more, review\nthe [Email Markup Getting Started](/workspace/gmail/markup/getting-started) guide.\n\nOrganization\n------------\n\nThe `Organization` type lets you specify a logo to include in the promotion.\n\n| Name | Type | Description |\n|--------|--------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `logo` | [ImageObject](/workspace/gmail/markup/reference/types/ImageObject) or [URL](/workspace/gmail/markup/reference/types/URL) | The logo that displays as an icon for the sender. Recommended to use an HTTPS URL. See [best practices for Logo URL](/workspace/gmail/promotab/best-practices#logo_url). |\n\nDiscountOffer\n-------------\n\nThe `DiscountOffer` type lets you create [deal\nannotations](/workspace/gmail/promotab/overview#deal-annotation), which promote the\ndetails of an offer such as the discount code or expiration date.\n\n| Name | Type | Description |\n|----------------------|-------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `description` | [Text](/workspace/gmail/markup/reference/types/Text) | Optional. A short text that displays next to the deal badge icon, such as `Free shipping` or `20% off`. See [best practices for the deal badge](/workspace/gmail/promotab/best-practices#deal_badge). |\n| `discountCode` | [Text](/workspace/gmail/markup/reference/types/Text) | Optional. The discount or promotion code of the offer, such as `20PROMO`. See [best practices for discount codes](/workspace/gmail/promotab/best-practices#discount_code). |\n| `availabilityStarts` | [DateTime](/workspace/gmail/markup/reference/datetime-formatting) | Optional. The date and time when the offer begins in [ISO 8601](https://support.google.com/merchants/answer/7055760) format, such as `2023-09-25T18:44:37-07:00`. |\n| `availabilityEnds` | [DateTime](/workspace/gmail/markup/reference/datetime-formatting) | Optional. The end date and time of the promotion in [ISO 8601](https://support.google.com/merchants/answer/7055760) format, such as `2023-10-25T18:44:37-07:00`. See [best practices for Expiration Date](/workspace/gmail/promotab/best-practices#expiration_date). |\n\nPromotionCard\n-------------\n\nThe `PromotionCard` type lets you include a visual preview of your promotion.\n\n| Name | Type | Description |\n|-----------------|--------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `image` | [ImageObject](/workspace/gmail/markup/reference/types/ImageObject) or [URL](/workspace/gmail/markup/reference/types/URL) | Required. The image preview of the email in PNG or JPEG format. The supported aspect ratios are 4:5, 1:1, and 1.91:1. Images are center-cropped automatically. See [best practices for images](/workspace/gmail/promotab/best-practices#images). For product carousels, each `PromotionCard` must have a unique image and use the same aspect ratio. |\n| `url` | [URL](/workspace/gmail/markup/reference/types/URL) | Required. The URL for the promotion. When users click on the email's `image`, they are directed to this URL. |\n| `headline` | [Text](/workspace/gmail/markup/reference/types/Text) | Optional. A 1 to 2-line description of the promotion that is displayed under the `image`. |\n| `price` | [Text](/workspace/gmail/markup/reference/types/Text) | Optional. The price of the promotion. If you set a `discountValue`, the `price` displays as the original price of the promotion before the discount is applied. |\n| `priceCurrency` | [Text](/workspace/gmail/markup/reference/types/Text) | Optional. The currency of the price in 3-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format, such as `USD`. Determines the currency symbol displayed with the price. |\n| `discountValue` | [Text](/workspace/gmail/markup/reference/types/Text) | Optional. The amount subtracted from the `price` to display an adjusted price. The adjusted price is displayed next to the original price. For example, if the `discountValue` is set to `25`, the `price` is set to `100`, and the `priceCurrency` is `USD`, the adjusted price is displayed as `$75`. |\n| `position` | [Text](/workspace/gmail/markup/reference/types/Text) | Optional. The position of the card in the carousel. |"]]