2017-12-01 17 views
0

여러 리뷰가있는 JSON-LD에서 제품 스 니펫을 만들려고합니다. 아래 코드는 리뷰를 하나만 포함 할 때 작동합니다. (코드 조각을 복사하여 콘솔의 다음 URL에 복사하여 복사하십시오 : https://search.google.com/structured-data/testing-tool). 그러나 여러 검토를 추가하는 방법이 명확하지 않습니다. 얼마간 고투하고 나 자신을 작동시킬 수는 없으며 모범을 찾기가 힘듭니다.제품 스 니펫에 여러 개의 리뷰를 추가하려면 어떻게해야합니까?

제품 등급에 "3.0"의 리뷰가있는 "John"의 리뷰와 제품에 "5.0"등급을 부여한 "Sarah"의 리뷰가 있다고합시다. Sarah의 리뷰를 아래 코드에 포함하려면 어떻게해야합니까?

{ 
    "@context": "http://schema.org/", 
    "@type": "Product", 
    "name": "Samsung Galaxy S", 
    "description": "A great product", 
    "brand": { 
"@type": "Thing", 
    "name": "Samsung" 
}, 
"aggregateRating": { 
    "@type": "AggregateRating", 
    "ratingValue": "4.0", 
    "reviewCount": "103" 
}, 
"offers": { 
    "@type": "Offer", 
    "priceCurrency": "EUR", 
    "price": "18", 
    "itemCondition": "http://schema.org/NewCondition", 
    "availability": "http://schema.org/InStock", 
    "seller": { 
     "@type": "Organization", 
     "name": "Samsung" 
    } 

} 
,"review": { 
    "@type": "Review", 
    "author": "John", 
    "datePublished": " 7 December 2016", 
    "description": "I love this product so much", 
    "name": "Amazing", 
    "reviewRating": { 
     "@type": "Rating", 
     "bestRating": "5", 
     "ratingValue": "3.0", 
     "worstRating": "1" 
    } 

} 


} 
+1

시도한 내용을 보여줄 수 있습니까? – unor

+0

google [배열]을 작성하는 방법을 [배열] –

답변

0

당신은 한 페이지에 여러 JSON-LD 조각을 첨부 할 수 있습니다, 그래서 당신은 샘플 당신에게서 검토 데이터를 제거하고, 독립 조각으로 이동할 수없는 이유를 이유가 없다. 당신은 당신이 그것을 검증 할 것을 볼 수 있습니다 https://search.google.com/structured-data/testing-tool에 여러 조각으로이 방법을 테스트하는 경우 다음 리뷰

<script type="application/ld+json"> 
{ 
    "@context": "http://schema.org/", 
    "@type": "Product", 
    "image": "http://www.example.com/iphone-case.jpg", 
    "name": "The Catcher in the Rye", 
    "review": { 
    "@type": "Review", 
    "reviewRating": { 
     "@type": "Rating", 
     "ratingValue": "4" 
    }, 
    "name": "iPhone 6 Case Plus", 
    "author": { 
     "@type": "Person", 
     "name": "Linus Torvalds" 
    }, 
    "datePublished": "2016-04-04", 
    "reviewBody": "I loved this case, it is strurdy and lightweight. Only issue is that it smudges.", 
    "publisher": { 
     "@type": "Organization", 
     "name": "iPhone 6 Cases Inc." 
    } 
    } 
} 
</script> 

에 대한

는 여기에 몇 가지 상용구 JSON-LD의 "사라"에 대한 또 다른 조각을 만들 수 있습니다.

대신 사이트에서 이와 동일한 작업을 수행 할 수 있습니다. 개별적인 리뷰를 삭제하고 총계를 수정 함 과녁 블록

<script type="application/ld+json"> { 
    "@context": "http://schema.org/", 
    "@type": "Product", 
    "name": "Samsung Galaxy S", 
    "description": "A great product", 
    "brand": { 
     "@type": "Thing", 
     "name": "Samsung" 
    }, 
    "aggregateRating": { 
     "@type": "AggregateRating", 
     "ratingValue": "4", 
     "reviewCount": "103", 
     "worstRating": "1", 
     "bestRating": "5" 
    }, 
    "offers": { 
     "@type": "Offer", 
     "priceCurrency": "EUR", 
     "price": "18", 
     "itemCondition": "http://schema.org/NewCondition", 
     "availability": "http://schema.org/InStock", 
     "seller": { 
     "@type": "Organization", 
     "name": "Samsung" 
     } 
    } 
}</script> 

행운을 비네!