在电子商务产品上使用 AMP-HTML

Using AMP-HTML on ecommerce product

我们在 Google Search Console 上仍然收到关于 AMP 的错误: AMP 验证:此 amp 页面上缺少必需的结构化数据元素。

使用验证器 (https://validator.ampproject.org) 我们得到验证状态:通过

我们正在使用元数据,google 结构化数据测试工具显示没有错误和警告。

这是一个例子url: (不想发送垃圾邮件,所以额外 space 写入以避免链接)

https://www. alpel.es/cosmo-nails-liquido-porcelana-uv-50-ml_amp

谢谢!

我认为您需要为此检查 Structure Data policies

Multiple entities on the same page

When you have multiple entity types on a page, we recommend you mark up all entities on that page to help Google algorithms better understand and index your content. For example:

A recipe page might have text describing the recipe along with an accompanying video. Each of these types should be marked separately with schema.org/Recipe and schema.org/VideoObject respectively. A category page listing several different products (or recipes, videos, or any other type). Each entity should be marked up using the relevant schema.org type, such as schema.org/Product for product category pages. Marking up just one category entity from all listed on the page is against our guidelines. A video play page might have related videos embedded in a separate section on the page. In this case, mark up the main video as well as the related videos. Image markup guidelines

When marking up an image URL as a property of a type, make sure that the image actually belongs to the instance of that type. For example, if you mark up the schema.org/image property of schema.org/NewsArticle, the marked-up image must directly belong to that news article.

您也可以查看 Product Guidelines

这个 SO thread and this discussion 也可能有帮助。

您需要使用 schema.org 添加一个 JSON-LD 结构。如果您愿意,可以使用 Microdata (itemprop),但它不能替代 JSON-LD 结构。该结构可以进入 <body>(以前仅限于 <head>)并且可以与 Microdata 规范相邻。

您可以修改以下结构以满足您的需要:

<script type="application/ld+json" id="20">
{
"@context":
 {
  "@vocab": "http://schema.org/",
  "id": "@id",
  "graph": "@graph",
  "type": "@type"
 },
"graph":
 [
  {
  "type": "Product",
  "id": "http://example.com/identifier/type/Product/19000000001001",
  "name": "",
  "alternateName": "",
  "description": "",
  "releaseDate": "2016-01-02",
  "manufacturer":
   {
   "type": "Corporation",
   "id": "Company IRI"
   },
  "offers":
   {
   "type": "Offer",
   "price": "",
   "priceCurrency": "USD",
   "id": "http://example.com/identifier/type/Intangible/Offer/14180000001007"
   },
  "isSimilarTo":
   [
    {
    "type": "Product",
    "id": "http://example.com/identifier/type/Product/1001"
    },
    {
    "type": "Product",
    "id": "http://example.com/identifier/type/Product/1002"
    }
   ],
  "isRelatedTo":
   [
    {
    "type": "Product",
    "id": "http://example.com/identifier/type/Product/1003"
    },
    {
    "type": "Product",
    "id": "http://example.com/identifier/type/Product/1004"
    }
   ],
  "audience":
   [
    {
    "type": "BusinessAudience",
    "id": "http://example.com/identifier/type/Intangible/Role/14290000001001"
    },
    {
    "type": "BusinessAudience",
    "id": "http://example.com/identifier/type/Intangible/Role/14290000001003"
    }
   ],
  "category":
   [
    {
    "type": "Thing",
    "id": "http://example.com/identifier/type/Product/1010"
    },
    {
    "type": "Thing",
    "id": "http://example.com/identifier/type/Product/1012"
    }
   ]
  }
 ]
}
</script>

您需要用您自己的技术替换用于指定唯一标识符 ("id":) 的正在使用的技术。

您的每个 @Product 项目(及其独特的 @id)都应包含在 @graph