ItemList error in SDTT: "All values provided for url must point to the same page" - schema.org

I'm trying to add the ItemList Schema.org markup on an article page that lists top 10 software with (external) links pointing to them.
When I tested the following JSON-LD markup on SDTT, I got the error message saying
All values provided for url must point to the same page
I don't really understand why the individual list items should use the same URL?!
{
"#context": "http://schema.org",
"#type": "ItemList",
"name": "Title of the page",
"description": "Description goes here",
"itemListElement": [
{
"#type": "ListItem",
"position": 1,
"item": {
"name": "Product 1",
"image": "https://www.product-1.com/image",
"URL": "https://www.product-1.com"
}
},
{
"#type": "ListItem",
"position": 2,
"item": {
"name": "Product 2",
"image": "https://www.product-2.com/image",
"URL": "https://www.product-2.com"
}
}
]
}
</script>
I used a slightly different markup without the "item": { as put in https://developers.google.com/search/docs/guides/mark-up-listings, but this time I'm getting an error message that says
All values provided for url must have the same domain
Can you please help me solve this problem?
{
"#context":"https://schema.org",
"#type":"ItemList",
"name": "Title of the page",
"description": "Description goes here",
"itemListElement":[
{
"#type":"ListItem",
"position":1,
"name": "Product 1",
"image": "https://www.product-1.com/image",
"URL": "https://www.product-1.com"
},
{
"#type":"ListItem",
"position":2,
"name": "Product 2",
"image": "https://www.product-2.com/image",
"URL": "https://www.product-2.com"
}
]
}

These errors are about Google’s Carousels feature. This feature requires certain url values:
If used on a summary page, all URLs in the list must point to different pages on the same domain.
If used on an all-in-one-page list, all URLs must point to the page hosting the list structured data.
Your case (linking to external sites) is simply not eligible for getting the Carousels feature in Google Search. You can (and should) keep your JSON-LD like this and ignore these errors in the SDTT.

Related

How do i add Likes Received to Structured Data in JSON-LD for Product Type

I've been trying to figure out a way to add how many likes were received to a product using structured data. Is what I have below correct? Or would the second example be more correct?
Is my usage of ["Product","InteractionCounter"] for the type correct in the first example?
I'm trying to have the google show a likes counter much like the aggregateRating property of Product.
I'm also not sure what the url in offers is supposed to point to or if it's necessary. Any ideas?
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": ["Product","InteractionCounter"],
"name": "CC-1",
"description": "Wedding Cake",
"interactionType":{
"#type":"LikeAction",
"name": "Likes",
"description": "Likes Received"
},
"interactionService": {
"#type":"WebSite",
"url": "https://example.com/index.php?page=gallery"
},
"userInteractionCount": 55
}
</script>
OR
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "Product",
"name": "CC-1",
"description": "Wedding Cake",
"additionalProperty": {
"#type": "PropertyValue",
"name": "Likes",
"description": "Likes Received",
"value": 55
}
}
</script>
This is what I have right now:
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": ["Product","InteractionCounter"],
"name": "CC-1",
"description": "Wedding Cake with bla bla bla",
"category": "Wedding Cakes",
"brand": {
"#type": "Brand",
"logo": "https://example.com/images/logo.png",
"slogan": "Cakes Are Nice"
},
"offers": {
"#type": "Offer",
"url": "https://example.com/anvil",
"priceCurrency": "CAD",
"price": "119.99"
},
"image": "https://example.com/collection/wedding_cakes/mid_def/CC-1",
"interactionType":{
"#type":"LikeAction",
"name": "Likes",
"description": "Likes Received"
},
"interactionService": {
"#type":"WebSite",
"url": "https://mimozas.com/index.php?page=gallery"
},
"userInteractionCount": "55 PLACEHOLDER"
}
If the product is the subject of content, then it makes sense to indicate likes as part of the type Product. My suggestion for you:
{"#context":"https://schema.org",
"#type":"Product",
"name":"CC-1",
"description":"Wedding Cake",
"subjectOf":{
"#type": "InteractionCounter",
"interactionType":{
"#type":"LikeAction",
"name":"Likes",
"description":"Likes Received"
},
"interactionService":{
"#type":"WebSite",
"url":"https://example.com/index.php?page=gallery"
},
"userInteractionCount":"55"
}
}
And be careful about inverted commas.
My addition after expanding the question.
I'm trying to have the google show a likes counter much like the
aggregateRating property of Product.
Google has no direct support for the type InteractionCounter - read more Explore the search gallery. However, in the rich test results of my suggestion, there are no errors or warning messages from Google:
Probably needs experimentation.

Structured data (schema.org) for Price lists / service lists

I'm building a website for a local beauty salon. They offer services such as massages and various beauty treatments. It's all visible on 1 overview page (price list)
I found out https://schema.org/Product can be used for services:
Any offered product or service. For example: a pair of shoes; a concert ticket; the rental of a car; a haircut
Fist question, can I ignore fields like availability and condition?
Second, should I list this products as ItemOffered inside Offer? Or is this not the correct way?
Example:
{
"#context": "http://schema.org",
"#type": "WebPageElement",
"offers": {
"#type": "Offer",
"itemOffered": [
{
"#type": "Product",
"#id": "/beauty-treatment-a",
"description": "Short description with details",
"name": "Beauty Treatment A",
"offers": {
"#type": "Offer",
"price": "18.28",
"priceCurrency": "EUR",
"description": "Same description",
"name": "Same name",
"image": {
"#context": "http://schema.org",
"#type": "ImageObject",
"contentUrl": "image-a.jpg",
"description": "Same name",
"width": 640,
"height": 640
}
}
},
{
"#type": "Product",
"#id": "/beauty-treatment-b",
"description": "Short description with details",
"name": "Beauty Treatment B",
"offers": {
"#type": "Offer",
"price": "18.28",
"priceCurrency": "EUR",
"description": "Same description",
"name": "Same name",
"image": {
"#context": "http://schema.org",
"#type": "ImageObject",
"contentUrl": "image-b.jpg",
"description": "Same name",
"width": 640,
"height": 640
}
}
]
}
}
Fist question, can I ignore fields like availability and condition?
Schema.org never requires a property. A consumer, like Google, might require properties for one of their features.
For Google’s Product feature,
availability is recommended for the rich result in Google Search, and required for the "Related Items" in Google Images, and
itemCondition is neither recommended nor required.
However, their feature is only for pages about a single product. So your page is not eligible for Google’s Product rich result.
Second, should I list this products as ItemOffered inside Offer? Or is this not the correct way?
You can either have Product as top-level item (with offers Offer), or Offer as top-level item (with itemOffered Product).
About your example:
There is no need to use WebPageElement; it’s typically not relevant information that a certain HTML element on a page contains an offer, it’s only relevant that there is an offer.
You have one offer that consists of two products, and two offers that consist of one product each (the same like in the first offer). You probably don’t want to have the first offer (unless there really is an offer that combines the two products).
I would recommend the following:
Use OfferCatalog for the list of offers.
Each list item is an Offer.
Each Offer points to its Product/Service with itemOffered.

Why does Google says that an item needs an url property in schema.org?

When I put an example from the ItemList page in the Structured Data Testing Tool by Google, it says that an item needs an url property.
The example:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "ItemList",
"name": "Top 5 covers of Bob Dylan Songs",
"itemListOrder": "http://schema.org/ItemListOrderAscending",
"numberOfItems": 5,
"itemListElement": [
{
"#type": "ListItem",
"position": 5,
"item": {
"#type": "MusicRecording",
"name": "If Not For You",
"byArtist": {
"#type": "MusicGroup",
"name": "George Harrison"
}
}
}
]
}
</script>
I simplified it to have a minimal example, but the error is the same with the exact example from the page.
I tested this code and there is no error here:
{
"#type": "ListItem",
"position": 5,
"item": {
"#type": "MusicRecording",
"name": "If Not For You",
"byArtist": {
"#type": "MusicGroup",
"name": "George Harrison"
}
}
}
Can anybody explain this to me?
A ItemList in general is a list collection of sites like a breadcrumb, overview of bandsites, etc.
If you only want a list without links to deatils sites you can use only ListItem with Items. This is the different of your samples ItemList and ListItem.

Defining Schema.org JSON-LD for my Multi-language Web application

I am building a web application for product comparison. The website has a structure like so:
http://example.com
http://example.com/fr/compare/
http://example.com/es/compare/
etc..
The main page is in English.
I want to insert Schema.org for each of the pages and I've construed this schema. Written in square brackets are what I intend to put as value later on.
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#id": "[canonical-url-for-specific-language]#webapp",
"#type": "WebApplication",
"name": "[Product Comparison Title in specific language]",
"url": "[canonica url for specific language]",
"applicationCategory": "Utility",
"applicationSubCategory": "Product Comparison",
"about": "[page-description]",
"browserRequirements": "Requires JavaScript. Requires HTML5.",
"softwareVersion": "1.0.0",
"screenshot": "[image-url]",
"inLanguage": "[language-code]",
"softwareHelp": {
"#type": "CreativeWork",
"url": "[link-to-how-to-page-for-specific-language]"
},
"operatingSystem": "All"
}
</script>
How can I construct this JSON-LD well to work for my specific website.
If you use structured data for a home page that has a language selector, then the markup can be similar to the following:
{
"#context": "https://schema.org",
"#id": "[canonical-url-for-specific-language]#webapp",
"#type": "WebApplication",
"name": "[Product Comparison Title in specific language]",
"url": "[canonica url for specific language]",
"applicationCategory": "Utility",
"applicationSubCategory": "Product Comparison",
"about": "[page-description]",
"browserRequirements": "Requires JavaScript. Requires HTML5.",
"softwareVersion": "1.0.0",
"screenshot": "[image-url]",
"inLanguage":[{
"#type": "Language",
"name": "English",
"alternateName": "en",
"additionalType":"https://www.loc.gov/standards/iso639-2/php/code_list.php",
"sameAs":"https://en.wikipedia.org/wiki/English_language"
},
{
"#type": "Language",
"name": "Spanish",
"alternateName": "es",
"additionalType":"https://www.loc.gov/standards/iso639-2/php/code_list.php",
"sameAs":"https://en.wikipedia.org/wiki/Spanish_language"
}],
"softwareHelp": {
"#type": "CreativeWork",
"name":"Customer Service and Support",
"url": [
"https://examples.com/en/help.html",
"https://examples.com/es/help.html"
]
},
"operatingSystem": "All"
}
Note that I have here used for each language two identifiers with the properties sameAs and additionalType.
If the web page is with one particular language, then just delete the part of the markup for the unnecessary language and the square brackets.
Check out this markup on the Google testing tool and note that there are two warnings that are useful to fix.

ListItem Schema [schema.org/ItemList] error: "All values provided for url must have the same domain."

I am facing issue with this ListItem schema validation on https://search.google.com/structured-data/testing-tool/u/0/
Getting error
All values provided for url must have the same domain.
I have provided same domain in every URL field.
{
"#context": "http://schema.org",
"#type": "ItemList",
"name": "Tech News",
"url": "http://m.gadgetsnow.com/tech-news",
"itemListElement": [
{
"#type": "ListItem",
"position": "1",
"url": "http://m.gadgetsnow.com/tech-news/are-tvs-going-out-of-fashion/articleshow/58375579.cms",
"name": "Are TVs going out of fashion?",
"image": {
"#type": "ImageObject",
"contentUrl": "http://m.gadgetsnow.com/photo/58375579.cms",
"width": "360",
"height": "270",
"url": "http://m.gadgetsnow.com/photo/58375579.cms"
}
},
{
"#type": "ListItem",
"position": "2",
"url": "http://m.gadgetsnow.com/tech-news/reliance-jio-discounts-are-not-going-anywhere-for-now-heres-why/articleshow/58374335.cms",
"name": "Reliance Jio discounts are not going anywhere for now, here's why",
"image": {
"#type": "ImageObject",
"contentUrl": "http://m.gadgetsnow.com/photo/58374335.cms",
"width": "360",
"height": "270",
"url": "http://m.gadgetsnow.com/photo/58374335.cms"
}
}
]
}
You may try using the correct version of ItemList. There are Separately and Combined marked up ItemLists as referred here.
If your items are on the same page, please use the version with items inside, the Combined one.
Otherwise, if you point to different pages inside and your items are not on one page, please DON’T put item element with type and other
description inside, the Separately marked up one.
Additional references:
Error in Google SDTT: "All values provided for url must point to the same page."
Schema.org and ContactPoint use with validation failure: “All values provided for http://www.example.com/ must have the same domain.”
There are no bugs. Be careful if the validator gives errors, a big chance that rich snippets will not work.
So what's the problem? The first thing to note is that in the ListItem object, either url or item can be used. As the schema.org documentation says, item is used for:
an artist’s list of data artists (e.g. an 'artist' in a list of 'artists')
And the most important thing that I noticed: if you use item and you want the scheme to be correct, then the domain and its parts should be the same in all ListItem, but the anchors are different, which are separated from the url using the # symbol. Google gives a specific example:
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "ItemList",
"itemListElement": [
{
"#type": "ListItem",
"position": "1",
"item": {
"#context": "https://schema.org/",
"#type": "Recipe",
"url": "http://example.com/big_list_of_recipes#cherry_pie",
}
},
{
"#type": "ListItem",
"position": "2",
"item": {
"#context": "https://schema.org/",
"#type": "Recipe",
"url": "http://example.com/big_list_of_recipes#coffee_cake",
...
}
}
]
}
</script>
As you can see in the list, the same URL is used http://example.com/big_list_of_recipe, but different anchors: #cherry_pie and #coffee_cake.
But still it is not clarity how to specify the URL, which is a separate page for the thing.