Confused about how #id in structured data works - schema.org

Basically, I'm trying to add BlogPosting, TechArticle and WebPage structured data types to my posts, but I'm getting errors in Google's structured data testing tool. They seem to be centred around when I link back to an Organization structured data type I've defined on my homepage, to save me having to repeat the same code across multiple pages.
Here's the structured data testing tool instance. Can anybody explain how I can properly link to the Organization data type (which is sitting on my homepage) in the author, creator and publisher properties?
https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Fwww.lukeharrison.dev%2Farticles%2Fmike-brewer-motors-wins-best-online-experience-at-autotraders-2018-retailer-awards%2F
I feel as though it may be down to me not fully understanding the #id property, and how to properly can use it to link structured data together to reduce repetitive data.
Here's the code involved:
The BlogPosting
The linked Organisation
The errors I'm receiving
Example of BlogPosting
{
"#context": "http://schema.org",
"#type": "BlogPosting",
"about": "Great news! Mike Brewer Motors - a project I've been heavily involved in over the past few years - has won the 'Best Online Experience' at the Autotrader 2018 Retailer Awards.",
"articleSection": "Blog Posts",
"author": {
"id": "https://www.lukeharrison.dev#organization"
},
"copyrightHolder": {
"id": "https://www.lukeharrison.dev#person"
},
"copyrightYear": "2019",
"creator": {
"id": "https://www.lukeharrison.dev#organization"
},
"dateCreated": "2018-07-20",
"dateModified": "2018-07-20",
"datePublished": "2018-07-20",
"description": "Great news! Mike Brewer Motors - a project I've been heavily involved in over the past few years - has won the 'Best Online Experience' at the Autotrader 2018 Retailer Awards.",
"genre": "Web Design & Front-End Development",
"headline": "Mike Brewer Motors wins 'Best Online Experience' at Autotrader's 2018 Retailer Awards - Luke Harrison",
"image": {
"#type": "ImageObject",
"height": 512,
"url": "https://s.gravatar.com/avatar/c34b34964896ad0552a5b342ae08c1e2?s=512",
"width": 512
},
"inLanguage": "en-GB",
"isFamilyFriendly": "true",
"keywords": [
"news"
],
"mainEntityOfPage": "https://www.lukeharrison.dev/articles/mike-brewer-motors-wins-best-online-experience-at-autotraders-2018-retailer-awards",
"publisher": {
"id": "https://www.lukeharrison.dev#organization"
}
}
Example linked Organization, which sits on another page
{
"#context": "http://schema.org",
"#id": "https://www.lukeharrison.dev#organization",
"#type": "Organization",
"additionalType": [
"http://www.productontology.org/id/Web_design",
"http://www.productontology.org/doc/Search_engine_optimization",
"http://www.productontology.org/doc/Web_development"
],
"foundingDate": "2013",
"legalName": "Luke Harrison - UX / Web Developer",
"logo": "https://www.lukeharrison.dev/img/share-26bfb69f23.png",
"name": "Luke Harrison - UX / Web Developer",
"sameAs": [
"https://twitter.com/webdevluke?lang=en-gb",
"https://www.linkedin.com/in/lukedidit/",
"https://github.com/WebDevLuke",
"https://codepen.io/lukedidit/"
],
"url": "https://www.lukeharrison.dev"
}
The errors I'm receiving in my BlogPosting structure
author, creator and publisher:
The attribute publisher.itemtype has an invalid value.
A value for the name field is required.

The errors are about Google’s Article rich result (if you don’t want to get this rich result, you can ignore these errors).
For AMP pages, author and publisher are required properties. They require actual items as value, #id references are not supported. You can still provide the #id, but you need to specify the #type and the required properties in addition.

Related

schema.org structure for more than one ebook

I want sell more than one ebook on my site. But all ebooks are in one package for a specific price. I dont know, how i must setup the schema.org. My first creation look like this:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "WebPage",
"mainEntity":{
"#type": "Book",
"author": "www.example.com",
"bookFormat": "https://schema.org/EBook",
"fileFormat": "application/pdf"
"image": "example.jpg",
"inLanguage": "English",
"name": "Example",
"numberOfPages": "20",
"genre": "Example",
"description": "Description example",
"keywords": "Keyword example",
"offers": {
"#type": "Offer",
"price": "1.00",
"priceCurrency": "USD",
"category": "",
"availability": "https://schema.org/OnlineOnly",
"availableDeliveryMethod": "http://purl.org/goodrelations/v1#DeliveryModeDirectDownload"
},
"publisher": "www.example.com",
}
}
</script>
Thanks for your help!
Your product seems a grouped product of downloadable products, which are enlisted eBooks.
There are two ways to implement a list format for your structured data:
Summary page + multiple full details pages
A single, all-in-one-page list
If the page has full details of each eBook in the list prefer A single, all-in-one-page list else if the page has short description of each eBook in the list use Summary page + multiple full details pages as described in here.
Regards,
Vivek

Schema.org 'specialty' property failing with Q&A type: "The property specialty is not recognised by Google for an object of type Question."

I'm trying to add the specialty property, following the Schema.org docs using JSON-LD. According to the QAPage docs, specialty is indeed a valid value for this schema type.
The problem is when I validate with Google's Structured Data Testing Tool, it spits out this error:
(The property specialty is not recognised by Google for an object of type Question.)
Now, Schema.org is partly ran by Google, so I don't feel it's an error on their end. Pretty sure it may be JSON-LD syntax but I've been trying different things all morning. Could anybody shed any light on the issue?
{
"#context": "https://schema.org",
"#type": "QAPage",
"mainEntity": {
"#type": "Question",
"name": "How many ounces are there in a pound?",
"text": "I have taken up a new interest in baking and keep running across directions in ounces and pounds. I have to translate between them and was wondering how many ounces are in a pound?",
"specialty": "SEO", //ISSUE LINE
"answerCount": 3,
"upvoteCount": 26,
"dateCreated": "2016-07-23T21:11Z",
"author": {
"#type": "Person",
"name": "New Baking User"
},
"acceptedAnswer": {
"#type": "Answer",
"text": "1 pound (lb) is equal to 16 ounces (oz).",
"dateCreated": "2016-11-02T21:11Z",
"upvoteCount": 1337,
"url": "https://example.com/question1#acceptedAnswer",
"author": {
"#type": "Person",
"name": "SomeUser"
}
},
"suggestedAnswer": [
{
"#type": "Answer",
"text": "Are you looking for ounces or fluid ounces? If you are looking for fluid ounces there are 15.34 fluid ounces in a pound of water.",
"dateCreated": "2016-11-02T21:11Z",
"upvoteCount": 42,
"url": "https://example.com/question1#suggestedAnswer1",
"author": {
"#type": "Person",
"name": "AnotherUser"
}
}, {
"#type": "Answer",
"text": " I can't remember exactly, but I think 18 ounces in a lb. You might want to double check that.",
"dateCreated": "2016-11-06T21:11Z",
"upvoteCount": 0,
"url": "https://example.com/question1#suggestedAnswer2",
"author": {
"#type": "Person",
"name": "ConfusedUser"
}
}
]
}
}
The specialty property needs to be added to WebPage (or one of its sub-types, like QAPage).
You added it to Question (where it’s not listed).

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.

Fix SDTT warning on JobPosting: "The value field is recommended."

On the Google Structured Data Testing Tool I get a warning for not entering a value in the baseSalary property.
The value field is recommended. Please provide a value if available.
However, I have added a value.
{
"#context": "http://schema.org",
"#type": "JobPosting",
"hiringOrganization": "Google",
"validThrough": "2018-12-31T00:00",
"baseSalary": {
"#type": "MonetaryAmount",
"currency": "USD",
"value": {
"#type": "QuantitativeValue",
"minValue": 40.00,
"maxValue": 50.00,
"unitText": "HOUR"
}
},
"jobBenefits": "Medical, Life, Dental",
"datePosted": "2011-10-31",
"description": "Description: ABC Company Inc. seeks a full-time mid-level software engineer to develop in-house tools.",
"educationRequirements": "Bachelor's Degree in Computer Science, Information Systems or related fields of study.",
"employmentType": "Full-time",
"experienceRequirements": "Minumum 3 years experience as a software engineer",
"incentiveCompensation": "Performance-based annual bonus plan, project-completion bonuses",
"industry": "Computer Software",
"jobLocation": {
"#type": "Place",
"address": {
"#type": "PostalAddress",
"addressLocality": "Poole",
"addressRegion": "Dorset",
"streetAddress": "33 Holton Road",
"postalCode": "BH16 6LT"
}
},
"occupationalCategory": "15-1132.00 Software Developers, Application",
"qualifications": "Ability to work in a team environment with members of varying skill levels. Highly motivated. Learns quickly.",
"responsibilities": "Design and write specifications for tools for in-house customers Build tools according to specifications",
"salaryCurrency": "USD",
"skills": "Web application development using Java/J2EE Web application development using Python or familiarity with dynamic programming languages",
"specialCommitments": "VeteranCommit",
"title": "Software Engineer",
"workHours": "40 hours per week"
}
Could someone please provide a fix so the code passes the Google Structured Data Testing Tool?
Your code violates the standard:
baseSalary doesn't contain something like hours, but only currency and the value or range.
Beside of this there is a inconsistency:
you write on one place:
"minValue": 40.00,
"maxValue": 50.00,
"unitText": "HOUR"
On another place:
"workHours": "40 hours per week"
What now? 40 hours or between 40 and 50?
Another thing: workHours are not for amount of working hours per week, but for typical beginning and ending of shift.

Is the Event type suitable for running races?

I have inline Schema.org code via itemprop attributes, on all event pages on a website.
Search Console is flagging up recommendations that I use performer and various other properties, however due to the nature of the events (they are races), there are no performers.
Does this imply that event is the wrong type of Schema.org here, or can the warnings be safely ignored?
The tags used are:
type
image
name
location
type
address
type
streetaddress
addresslocality
address country
type
name
aggregaterating
type
reviewcount
ratingvalue
The Event type is perfectly suitable for races. But you should use the more specific SportsEvent.
Schema.org never requires any property, but consumers (who offer features based on Schema.org structured data) have their own requirements. If you want to get the feature, you would have to comply; if you don’t want the feature (or you can’t get it because you can’t provide all the required data), you can simply ignore any kind of errors/warnings from this consumer.
The consumer Google Search offers the event rich result feature, which has required and recommended properties. The performer property is just recommended, so it should be possible to get the event rich result without providing a performer.
Note that the guide of Google for Event requires the use of the following property that are not in the markup scheme you specified: startDate.
There are also many recommended properties out there that you are missing and these lower the value of the rich results of Google in the SERP:
description
endDate
location.name
offers
Note that the property executor can have the embedded type PerformingGroup, e.g.:
"performer": {
"#type": "PerformingGroup",
"name": "McLaren"
}
This way you can create markup for the team but not for each rider.
More detailed markup with structured data enriches the SERP of your web pages.
Beeing a webdeveloper and racedirector, I have been looking into this for some time now. If you take a look at the races website (no, this is no advertising for the best race on the planet), you can see that I have an event (SportsEvent) and six different competitions on that very day: 100km ultramarathon
What you see here is what I assembled so far to make my race as machine readable as possible. I have the adress, the different competitions, the place, the entry fees and the offers, the dooring time and all the stuff I might need google to know.
The only thing that is missing is the list of the competitors, the runners of each race. I am doing research about how to do this right now, but "sports" in microformats seems to be a team based thing. If I found out how to do it right, I'll post an update here. And you'll see it in the websites source code of course.
I have copied the LD-JSON here for future reference in case I'd edit the code of the website.
FYI: I am getting the participants data as XML feed directly from the raceresult registration website.
<script type='application/ld+json'>
{
"#context": "http://schema.org",
"#type": "SportsEvent",
"#id": "https://whew100.de/wettbewerbe/whew100.html",
"name": "WHEW100 Ultramarathon",
"image": "https://whew100.de/assets/images/WHEW100_transparent.png",
"url": "https://whew100.de/wettbewerbe/whew100.html",
"description": "WHEW100 Ultramarathon in Wuppertal über Wülfrath, Velbert, Heiligenhaus, Essen, Hattingen und Sprockhövel. Auf alten Bahntrassen zwischen Wuppert und Ruhr.",
"startDate": "2019-05-04T07:00:00",
"endDate": "2019-05-04T22:00:00",
"doorTime": "2019-05-04T06:00:00",
"maximumAttendeeCapacity": "200",
"aggregateRating": {
"#type": "AggregateRating",
"ratingValue": "4.9",
"reviewCount": "84"
},
"location": {
"#type": "Place",
"name": "Utopiastadt",
"sameAs": "https://www.clownfisch.eu/utopia-stadt/bahnhof-mirke/",
"address": {
"#type": "PostalAddress",
"streetAddress": "Mirker Straße 48",
"addressLocality": "Wuppertal",
"postalCode": "42105",
"addressCountry": "Germany"
}
},
"competitor": [
],
"offers": {
"#type": "Offer",
"description": "Anmeldung zum WHEW100",
"url": "http://my.raceresult.com/105067/",
"price": "75",
"priceCurrency": "EUR",
"availability": "200",
"validFrom": "2018-09-01T00:00:00"
},
"superEvent": {
"#id": "https://whew100.de",
"name": "WHEW100",
"startDate": "2019-05-04T07:00:00",
"endDate": "2019-05-04T22:00:00",
"location": {
"#type": "Place",
"name": "Utopiastadt",
"sameAs": "https://www.clownfisch.eu/utopia-stadt/bahnhof-mirke/",
"address": {
"#type": "PostalAddress",
"streetAddress": "Mirker Straße 48",
"addressLocality": "Wuppertal",
"postalCode": "42105",
"addressCountry": "Germany"
}
}
}
}
</script>