在哪里可以找到gmail推广注释中关于轮播/多图的文档?

问题描述 投票:0回答:1

重复如何在gmail促销注释中使用轮播/多个图像?但问题只是与gmail-promo-tabs标签相关,而不是官方Gmail API支持询问的gmail-api我认为是也许看不到。

问题是一样的,我在 Gmail 中看到了多个图像轮播的示例,包括用于 Gmail 注释的 CatalogCardLayout(轮播图像),但我没有找到任何有关它的文档。

我想知道这个功能是否仍然存在以及文档在哪里?

gmail gmail-api gmail-promo-tab
1个回答
0
投票

此功能仍然存在,称为交易注释和产品轮播。它可以使用电子邮件文件中的 JSON-LD 或微数据来实现。虽然交易注释可以开箱即用,但您必须发送电子邮件至 [email protected] 才能使用此功能来利用图像。您可以在下面找到文档的链接。

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
  <head>
    <script type="application/ld+json">
      [
        // Build the first image preview in your product carousel:
        {
          "@context": "http://schema.org/",
          "@type": "PromotionCard",
          "image": "IMAGE_URL1",
          "url": "PROMO_URL1",

          // Optionally, include the following PromotionCard properties:
          "headline": "HEADLINE1",
          "price": PRICE1,
          "priceCurrency": "PRICE_CURRENCY1",
          "discountValue": DISCOUNT_VALUE1,
          "position": POSITION
        },

        // Build the second image preview in your product carousel:
        {
          "@context": "http://schema.org/",
          "@type": "PromotionCard",
          "image": "IMAGE_URL2",
          "url": "PROMO_URL2",

          // Optionally, include the following PromotionCard properties:
          "headline": "HEADLINE2",
          "price": PRICE2,
          "priceCurrency": "PRICE_CURRENCY2",
          "discountValue": DISCOUNT_VALUE2,
          "position": POSITION
        }

        // To include more image previews, add additional PromotionCard objects.
        // You can include up to 10 image previews in a product carousel.

      ]
    </script>
  </head>

  <body>
    // The message of your email
  </body>
</html>

IMAGE_URL:PNG 或 JPEG 格式图像的 URL,例如 https://www.example.com/image.png。支持的宽高比为 4:5、1:1、1.91:1。对于产品轮播,每个图像必须具有唯一的 URL 并使用相同的宽高比。

文档链接:https://developers.google.com/gmail/promotab/overview#product-carousel

© www.soinside.com 2019 - 2024. All rights reserved.