This is an example of JSON-LD for a Schema.org Product:
<script type="application/ld+json">
{
"#context": "http://schema.org/",
"#type": "Product",
"name": "Executive Anvil",
"image": "http://www.example.com/anvil_executive.jpg",
"brand": {
"#type": "Thing",
"name": "ACME"
},
"aggregateRating": {
"#type": "AggregateRating",
"ratingValue": "4.4",
"ratingCount": "89"
},
"offers": {
"#type": "AggregateOffer",
"lowPrice": "119.99",
"highPrice": "199.99",
"priceCurrency": "USD"
}
}
</script>
But I have a lot of more properties for my product.
For example a related gallery, related videos, a long main text.
There are not these properties in Product.
Do I have to leave them? Or is there a way to use them?
For content about the product (like a video, a gallery, an article, etc.) you could use the Product item as value of the about property:
{
"#context": "http://schema.org/",
"#type": "VideoObject",
"name": "Video about your product",
"about": {
"#type": "Product",
"name": "Your product"
}
}
With JSON-LD’s #reverse, you can specify these within the Product item, if you prefer it:
{
"#context": "http://schema.org/",
"#type": "Product",
"name": "Your product",
"#reverse": {
"about": {
"#type": "VideoObject",
"name": "Video about your product"
}
}
}
Related
I am building a website to reference movie showtimes.
The site shows a now playing page with a list of movies, each movie has a page with the upcoming showtimes.
I added some structured data to enhance the way search engines sees the data on my website.
Here is what I have so far:
{
"#context": "https://schema.org",
"#type": "ItemList",
"numberOfItems": 2,
"itemListElement": [
{
"#type": "ListItem",
"name": "Screening Event 1",
"position": 1,
"item": {
"#context": "https://schema.org",
"#type": "ScreeningEvent",
"startDate": "2021-09-18T15:15:00.000Z",
"url": "http://localhost:3000/film/Boite-noire/663260#6144ab7a22b6d900165aa836",
"inLanguage": "fr",
"location": {
"#context": "https://schema.org",
"#type": "MovieTheater",
"name": "Pathé Tunis City",
"url": "http://localhost:3000/medium/pathe-tunis-city"
},
"workPresented": {
"#context": "https://schema.org",
"#type": "Movie",
"name": "Boîte noire",
"image": "https://image.tmdb.org/t/p/w300_and_h450_bestv2/jIfFFC4YwiI8TVaGtbl1eT9BRaI.jpg",
"url": "http://localhost:3000/film/Boite-noire/663260",
"sameAs": "https://imdb.com/title/tt10341034",
"director": {
"#type": "Person",
"name": "Yann Gozlan"
}
}
}
},
{
"#type": "ListItem",
"name": "Screening Event 2",
"position": 2,
"item": {
"#context": "https://schema.org",
"#type": "ScreeningEvent",
"startDate": "2021-09-18T20:15:00.000Z",
"url": "http://localhost:3000/film/Boite-noire/663260#6144ab8522b6d900165aa837",
"inLanguage": "fr",
"location": {
"#context": "https://schema.org",
"#type": "MovieTheater",
"name": "Pathé Tunis City",
"url": "http://localhost:3000/medium/pathe-tunis-city"
},
"workPresented": {
"#context": "https://schema.org",
"#type": "Movie",
"name": "Boîte noire",
"image": "https://image.tmdb.org/t/p/w300_and_h450_bestv2/jIfFFC4YwiI8TVaGtbl1eT9BRaI.jpg",
"url": "http://localhost:3000/film/Boite-noire/663260",
"sameAs": "https://imdb.com/title/tt10341034",
"director": {
"#type": "Person",
"name": "Yann Gozlan"
}
}
}
}
]
}
Is there a better way to represent this kind of information without repeating data ?
My suggestion gave the google guide for Carousel --> Single, all-in-one-page list:
{
"#context": "https://schema.org",
"#type": "Movie",
...
"#id":"https://cinema.com/lordofrings.html",
"name":"Lord of the rings",
"subjectOf":{
"#type": "ItemList",
"itemListElement": [
{
"#type": "ListItem",
"position": "1",
"item": {
"#type": "ScreeningEvent",
"url": "https://cinema.com/lordofrings.html#15",
"startDate": "2021-09-18T15:00:00+01:00"
}
},
{
"#type": "ListItem",
"position": "2",
"item": {
"#type": "ScreeningEvent",
"url": "https://cinema.com/lordofrings.html#18",
"startDate": "2021-09-18T18:00:00+01:00"
}
}
]
}
}
For ellipsis, set the required movie info and add all the required and recommended properties for the Google Rich Results Test.
I have the following JSON-LD:
{
"mainEntity": {
"itemListElement": [{
"author": {
"#id": "https://www.example.co.uk/gardens-and-driveways/blog/author/test",
"image": "https://www.example.co.uk/blog/authors/no-image",
"name": "Test Author",
"#type": "Person"
},
"publisher": {
"#id": "http://www.example.co.uk",
"logo": "https://www.example.co.uk/logo.png",
"name": "Test Organisation",
"#type": "Organization"
},
"datePublished": "2015-08-10T11:04:33",
"headline": "Blog headline",
"image": "https://www.example.co.uk/blog-image.jpg",
"url": "https://www.example.co.uk/blog-article",
"name": "Blog Article",
"#type": "BlogPosting"
}],
"#type": "ItemList"
},
"url": "https://www.example.co.uk/blog-category-page",
"#context": "https://schema.org/",
"description": "Blog articles in this category",
"name": "Blog category",
"#type": "CollectionPage"
}
Which if I try to validate using Google's validator will throw the error for the publishers organisation logo field.
https://www.example.co.uk/logo.png (A value for the url field is required.)
Looking at the documentation for Organization it says that logo can be a string or an image type so why is this failing?
Conversely, if you just try to validate the Organization bit by itself, it will pass:
{
"#id": "http://www.example.co.uk",
"logo": "https://www.example.co.uk/logo.png",
"name": "Test Organisation",
"#type": "Organization"
}
Googles own guidelines are a bit stricter when it comes to the publisher entity for an Article:
https://developers.google.com/search/docs/data-types/article
It shows the publishers image needs to be marked up as an ImageObject.
I have the following JSON-LD and am trying to represent a pay monthly product such as a mobile phone contract which consists of an upfront fee and a monthly fee.
When I try to add the unitCode, I get the following warning:
The property priceSpecification is not recognized by Google for an object of type Product.
{
"#context": "https://schema.org/",
"#type": "Product",
"name": "Apple iPhone",
"image": [
"https://example.com/photos/1x1/photo.jpg",
"https://example.com/photos/4x3/photo.jpg",
"https://example.com/photos/16x9/photo.jpg"
],
"description": "Apple iPhone XS ...",
"sku": "0446310786",
"mpn": "925872",
"brand": {
"#type": "Thing",
"name": "ACME"
},
"review": {
"#type": "Review",
"reviewRating": {
"#type": "Rating",
"ratingValue": "4",
"bestRating": "5"
},
"author": {
"#type": "Person",
"name": "Fred Benson"
}
},
"aggregateRating": {
"#type": "AggregateRating",
"ratingValue": "4.4",
"reviewCount": "89"
},
"offers": {
"#type": "Offer",
"url": "https://example.com/anvil",
"priceCurrency": "GBP",
"price": "39.99",
"priceValidUntil": "2020-11-05",
"itemCondition": "https://schema.org/UsedCondition",
"availability": "https://schema.org/InStock",
"seller": {
"#type": "Organization",
"name": "Executive Objects"
}
},
"priceSpecification": {
"#type": "UnitPriceSpecification",
"price": "25",
"priceCurrency": "GBP",
"referenceQuantity": {
"unitCode": "MON"
}
}
}
You need to add the priceSpecification property to the Offer, not to the Product.
{
"#context": "https://schema.org/",
"#type": "Product",
"offers": {
"#type": "Offer",
"priceSpecification": {
"#type": "UnitPriceSpecification"
}
}
}
You can find the expected domain/range of a property on its page. For priceSpecification, it says:
Used on these types
Demand
Offer
TradeAction
So, it’s not expected on Product.
We're trying to use the aggregateRating tag but we're getting this warning in the SDTT:
The aggregateRating property inside a Review object applies to the review itself, as a creative work. Did you mean to use reviewRating instead.
We want to aggregate the reviews from all users, not use reviewRating (we already use that one for our own reviews).
Does anyone know how to fix this error?
JSON-LD (example page):
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "Review",
"name": "It",
"datePublished": "2017-09-06",
"description": "Based on Stephen King's 1986 novel, […]",
"url": "https://dev.commonsensemedia.org/movie-reviews/it",
"reviewBody": "Based on Stephen King's 1986 novel, […]",
"author": {
"#type": "Person",
"name": "Jeffrey M. Anderson",
"sameAs": "https://dev.commonsensemedia.org/users/jeffrey-m-anderson"
},
"itemReviewed": {
"#type": "Movie",
"name": "It",
"sameAs": "http://www.imdb.com/title/tt1396484/",
"datePublished": "2017-09-08",
"image": {
"#type": "ImageObject",
"url": "image.jpg"
},
"director": {
"#type": "Person",
"name": "Andres Muschietti"
},
"actor": [
{
"#type": "Person",
"name": "Bill Skarsg\u00e5rd"
},
{
"#type": "Person",
"name": "Jaeden Lieberher"
},
{
"#type": "Person",
"name": "Finn Wolfhard"
}
]
},
"publisher": {
"#type": "Organization",
"name": "Common Sense Media",
"sameAs": "https://www.commonsensemedia.org"
},
"reviewRating": {
"#type": "Rating",
"ratingValue": "4"
},
"aggregateRating": {
"#type": "AggregateRating",
"ratingValue": "4.04651",
"bestRating": 5,
"worstRating": 1,
"reviewCount": "43",
"name": "Parents say",
"description": "All parent member reviews for It"
}
}
</script>
When you add the aggregateRating property to the Review item, the aggregated rating is for the review, not for the reviewed item.
If the aggregated rating is for the reviewed item, you have to add the aggregateRating to this item (e.g., Movie).
If that is what you want, you can move the aggregateRating under Movie, e.g.:
{
"#context": "http://schema.org",
"#type": "Review",
"itemReviewed": {
"#type": "Movie",
"aggregateRating": {
"#type": "AggregateRating"
}
}
}
I would like to make rich snippets for product pages appear in google SERPS. It's for a page that:
Contains multiple products that each have individual prices
Has an average aggregate rating
As far as I understand it's possible to add multiple products to one page in schema org using multiple offers. The problem is that I couldn't find the documentation on how to do that using JSON-LD. I've tried it myself in the code below but have no idea if this is correct. Can I just add offers like this or do I need to add them in a different way?
<script type="application/ld+json">
{
"#context": "http://schema.org/",
"#type": "Product",
"aggregateRating": {
"#type": "AggregateRating",
"ratingValue": "[rating variable]",
"reviewCount": "[count variable]"
},
"name": "[product name]",
"offers": {
"#type": "Offer",
"price": "[price of product]",
"priceCurrency": "[currency]"
},
"name": "[product name]",
"offers": {
"#type": "Offer",
"price": "[price of product]",
"priceCurrency": "[currency]"
},
"name": "[product name]",
"offers": {
"#type": "Offer",
"price": "[price of product]",
"priceCurrency": "[currency]"
},
}
</script>
just create an array of the offers.
<script type="application/ld+json">
{
"#context": "http://schema.org/",
"#type": "Product",
"name": "[name]",
"image": "[logo]",
"aggregateRating": {
"#type": "AggregateRating",
"ratingValue": "[rating],
"reviewCount": "[votes]"
},
"offers": [{
"#type": "Offer",
"priceCurrency": "[currency]",
"price": "[price]",
"category": {
"#type": "thing",
"name": "[name product]"
}
},{
"#type": "Offer",
"priceCurrency": "[currency]",
"price": "[price]",
"category": {
"#type": "thing",
"name": "[name product]"
}
},{
"#type": "Offer",
"priceCurrency": "[currency]",
"price": "[price]",
"Category": {
"#type": "thing",
"name": "[name product]"
}
}]
}
</script>