schema.org - 结构化标记将模型添加到产品数据

标签 schema.org microdata

对于以下情况,我有一个关于使用结构化标记(Microdata/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 结构化数据测试工具会警告“报价”为空。

第二季度。如何指定“thingymabob”显示的自定义数据。我假设它与“additionalProperty”有关,但测试工具提示 Google 无法识别 ProductModel 类型的对象的“additionalProperty”。 (虽然看起来它来自http://schema.org/ProductModel)


更新

好的,这里是更新,定价现在全部为 tikity-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目前不允许这样做吗?它确实在测试工具中返回此消息:“对于 ProductModel 类型的对象,Google 无法识别属性additionalProperty。”还有其他方法可以实现这一目标吗?

最佳答案

遗憾的是 Google 搜索 ( according to their documentation ) 仅支持 price ,不是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。)

关于schema.org - 结构化标记将模型添加到产品数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30711198/

相关文章:

html - 搜索结果中的微数据站点名称 : "Attribute itemprop not allowed on element link at this point."

xhtml - 在 xhtml 页面中使用 schema.org 标记和评论时,不显示星级和聚合评分

seo - 谷歌附加链接搜索框

schema.org - 如何使用 Schema.org + Microdata 进行新的扩展?

microdata - 'itemscope' 之外的属性被假定属于 'WebPage' ,但这会创建无效的微数据

schema.org - "The property gtin12 is not recognized by Google for an object of type Text"

html - 为什么 Google 建议在 Body 中使用 META TAGS?

html - 多个 Schema.org 产品项目及其在搜索引擎结果中的外观如何?

schema.org - 将 'license' 字段添加到 schema.org 地点记录

seo - 什么微数据使视频游戏图像出现在谷歌桌面搜索轮播上