结构化标记将模型添加到产品数据

Structured markup adding models to product data

我有一个关于使用结构化标记(微数据/Schema.org)的正确方法的问题,我有一个主要的概述产品,然后在其中有一个具有单独价格和自定义属性。

简化示例:

<div class="mainproduct" itemscope itemtype="http://schema.org/Product">
 <h1 itemprop="name">Product Name</h1>
 <p itemprop="description">Lorem ipsum my description oh yay all hear this.</p>
 <div class="modelslist" >
   <div class="model" itemscope itemtype="http://schema.org/ProductModel">
     <h2 itemprop="name">Model A</h2>
     <span itemscope itemtype="http://schema.org/Offer">
         <meta itemprop="price" content="£123" />
         <span itemscope itemtype="http://schema.org/PriceSpecification">
             <span itemprop="price">£123</span>
             <meta itemprop="priceCurrency" content="GBP" />
             <meta itemprop="valueAddedTaxIncluded" content="false" />
         </span>
     </span>
     <span itemscope itemtype="http://schema.org/PropertyValue">
          <meta itemprop="name" content="readability" />
          <span itemprop="value">325</span>
     </span>                                                                        
   </div>
   <div class="model" itemscope itemtype="http://schema.org/ProductModel">
     <h2 itemprop="name">Model B</h2>
     <span itemscope itemtype="http://schema.org/Offer">
         <meta itemprop="price" content="£456" />
         <span itemscope itemtype="http://schema.org/PriceSpecification">
             <span itemprop="price">£456</span>
             <meta itemprop="priceCurrency" content="GBP" />
             <meta itemprop="valueAddedTaxIncluded" content="false" />
         </span>
     </span>
     <span itemscope itemtype="http://schema.org/PropertyValue">
          <meta itemprop="name" content="readability" />
          <span itemprop="value">325</span>
     </span>  
   </div>
 </div>
</div>

Q1。指定价格然后指定价格规格是否正确?如果没有元价格,Google 结构化数据测试工具会警告 "offer" 为空。

Q2。如何指定 "thingymabob" 显示的自定义数据。我假设它与 "additionalProperty" 有关,但测试工具抱怨 "additionalProperty" 无法被 Google 识别为 ProductModel 类型的对象。 (虽然它似乎来自 http://schema.org/ProductModel


更新

好的,现在是更新,定价现在都是 tickity-boo 并且 itemprop="model"、itemprop="offers" 和 itemprop="priceSpecification" 的添加全部完成正确的嵌套。

<div class="mainproduct" itemscope itemtype="http://schema.org/Product">
   <h1 itemprop="name">Product Name</h1>
   <p itemprop="description">Lorem ipsum my description oh yay all hear this.</p>
   <div class="modelslist" >
       <div class="model" itemprop="model" itemscope itemtype="http://schema.org/ProductModel">
           <h2 itemprop="name">Model A</h2>
           <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
             <meta itemprop="price" content="123" />
             <meta itemprop="priceCurrency" content="GBP" />
             <span itemprop="priceSpecification" itemscope itemtype="http://schema.org/UnitPriceSpecification">
                £<span itemprop="price">123</span>
                <meta itemprop="priceCurrency" content="GBP" />
                <meta itemprop="valueAddedTaxIncluded" content="false" />
             </span>
          </span>
          <span itemprop="additionalProperty" itemscope itemtype="http://schema.org/PropertyValue">
              <meta itemprop="name" content="readability" />
              <span itemprop="value">325</span>
          </span>                                                                        
    </div>
    <div class="model" itemprop="model" itemscope itemtype="http://schema.org/ProductModel">
        <h2 itemprop="name">Model B</h2>
        <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
           <meta itemprop="price" content="456" />
           <meta itemprop="priceCurrency" content="GBP" />
           <span itemprop="priceSpecification" itemscope itemtype="http://schema.org/UnitPriceSpecification">
               £<span itemprop="price">456</span>
               <meta itemprop="priceCurrency" content="GBP" />
               <meta itemprop="valueAddedTaxIncluded" content="false" />
          </span>
       </span>
       <span itemprop="additionalProperty" itemscope itemtype="http://schema.org/PropertyValue">
          <meta itemprop="name" content="readability" />
          <span itemprop="value">325</span>
      </span>  
    </div>
  </div>
</div>

这只留下了向模型添加额外属性的问题。从 http://schema.org/ProductModel 看来,additionalProperty 应该没问题 - 只是 Google 当前不允许吗?它会在测试工具中显示 return 这条消息:"The property additionalProperty is not recognised by Google for an object of type ProductModel." 还有其他方法吗?

很遗憾 Google 搜索 (according to their documentation) only supports price, not priceSpecification。我相信他们将来会支持它(如果不是这样,尽管没有记录)。

提供这两个属性似乎是一个合适的解决方案,尤其是在您没有的这种简单情况下,e.g., a monthly fee

关于您对价格的加价:

因此您的标记可能如下所示:

<span itemscope itemtype="http://schema.org/Offer">
  <meta itemprop="price" content="123" />
  <meta itemprop="priceCurrency" content="GBP" />
  <span itemprop="priceSpecification" itemscope itemtype="http://schema.org/UnitPriceSpecification">
    £<span itemprop="price">123</span>
    <meta itemprop="priceCurrency" content="GBP" />
    <meta itemprop="valueAddedTaxIncluded" content="false" />
  </span>
</span>

(请注意,您还应该使用 属性 从它所属的产品中引用此 Offer。)