0

我们丰富的片段突然消失已经超过4个月,GWT中报告了一些错误,我纠正了所有错误,错误现在正在减少(仅剩下5个)。这里是我的代码:我的结构数据有什么问题?

<section class="c-center" itemscope itemtype="http://schema.org/Product"> 
    <div> 
     <h1><span itemprop="name">Product name</span> <span itemprop="brand" class="brand"><a href="/link-to-brand/">Brand of product</a></span></h1> 
     <div id="reviews" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> 
      <div class="rating"> 
       <meta itemprop="ratingValue" content="4.8" /> 
       <meta itemprop="ratingCount" content="56" /> 
       <div class="fill" style="width:96%"></div> 
       <div class="stars"></div> 
      </div> 
      <div class="rating-info"> 
       <a href="#ratings-reviews">Based on 56 reviews</a> - <a href="#">Write a review</a> 
      </div> 
     </div> 
    </div> 

    <div id="img"> 
     <img src="/link-to-image.jpg" alt="Img alt" itemprop="image" /> 
    </div> 

    <div id="info"> 
     <meta itemprop="url" content="site.com/link-of-product/"> 
     <div id="price-container" itemprop="offers" itemscope itemtype="http://schema.org/Offer"> 
      <meta itemprop="priceCurrency" content="EUR"> 
      <meta itemprop="gtin13" content="1234567899999"> 
      <span class="price" itemprop="price">19,95 €</span> <del>28,50 €</del> - 
      <span class="stock"><link itemprop="availability" href="http://schema.org/InStock">Available</span> 
     </div> 
    </div> 
</section> 

这里是我的问题:
1 - 有什么不对?
2 - 我已经在很多帖子看出,货币不应该在itemprop="price"但在谷歌的例子,他们不包括它!我该怎么办?
3-我应该使用ratingCount还是reviewCount
4-一些产品在不同大小存在不同的价格,最好先包括AggregateOffer与最低和最高价格是多少?

非常感谢

回答

1

它是如何在视觉上出现?

structured data linter显示了一个典型的片断这看起来不错,有星级,有谷歌的工具,没有错误。两件事中脱颖而出是:

  • 网址有没有协议,设置为http://yoursite.com/page1
  • 价格应该只是数量,这很可能会影响搜索结果,货币是一个独立的字段,因此不应该被嵌入价格以及
  • 使用<meta>用句号作为分隔符,而不是逗号给你的价格,并把大值1234567.89不1,234,567.89或1.234.567,89但显示它,你通常会

price来自http://schema.org/的信息

使用priceCurrency属性(使用ISO 4217代码“美元”)而不是在值中包含诸如'$'的模糊符号。

使用 '' (Unicode'FULL STOP'(U + 002E))而不是','来表示小数点。避免使用这些符号作为可读性分隔符。

注意两个RDFa和微语法允许一起发布简单的机器可读值更人性化的格式使用“内容=”属性。

使用中的值(Unicode'DIGIT ZERO'(U + 0030)到'DIGIT NINE'(U + 0039))而不是表面上类似的Unicode符号。

谷歌,其实是给予在这个例子中其policies page

<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">119.99</</span> 
  • 以前发售的价格,你可以包括在过期的优惠价格<del>结构化的数据,与priceValidUntil过去设定的日期,目前的价格也可以有一个到期日。

  • 考虑设置itemConditionhttp://schema.org/NewCondition

  • 图像的URL - 我注意到,完整的URL路径开始,而不是相对路径似乎是首选 - 你/link-to-image.jpg被解释为http://example.com/link-to-image.jpg在测试工具不http://site. com/link-to-image.jpg,我不确定这是否与直接从网址进行测试时相同,但似乎最好不要使用金钱

  • 最后使用购物搜索工具,包括谷歌购物搜索畅销书,查看它是否可以找到它由价格,品牌,可用性等我f竞争对手的网站首先出现,你甚至可以检查结构化数据测试器与他们的网址,看看你是否缺少任何东西

+0

感谢Mousey的详细回复。 其实现在什么都没有出现,它在4或5个月前消失了! :/ 好的价格标签,我会分开货币和价格本身。 以及问题3和4? :) 谢谢 – Websphere

+0

q3如果你想在片段中的星星,他们是评分而不是文字评论使用ratingCount。如果您有完整的评价,请使用reviewCount。详细信息在http://schema.org/AggregateRating上 - 正如您在结构化数据linter中看到的星星出现的一样,所以它看起来是正确的。使用您的URL检查linter和google结构化数据测试人员,确保数据得到识别。 q4-据我所知,没有报价总计,用'itemprop =“offer”'属性嵌套高价和低价。更改通常在手动重新获取页面后显示3-4天,如果不检查语法错误 – Mousey

+0

实际上,linter会显示starsCount和reviewCount的星星,这就是为什么我想知道应该使用哪一个!
关于综合报价,我看到它在此页上:[链接](https://developers.google.com/structured-data/rich-snippets/products) 我已经手动提取不同的网址,但他们仍然没有显示在谷歌结果页:(语法和所有的代码是正确的。我现在只有2个错误留在GWT,我会等到我没有更多的错误,并希望所有将恢复正常! – Websphere