schema.org BusinessFunction - GoodRelations - schema.org

I want to mark web page with schema.org tags. I can find in the documentation that one can specify a kind o business with using tag: BusinessFunction and tag from GoodRelations.
The problem is I can not find example of it. Because the web page is about software developer I'm going to use tag: http://purl.org/goodrelations/v1#ProvideService.
Can anybody give me an example?

First of all: A related yet bit outdated resource on modeling services with GoodRelations (and thus schema.org) is here: http://www.ebusiness-unibw.org/wiki/GoodRelationsService
This explains the basic pattern. Note that Some GoodRelations elements have slightly different names in schema.org, as listed here: http://wiki.goodrelations-vocabulary.org/Cookbook/Schema.org#Naming_Differences
I plan to update this page and migrate it to the new GoodRelations Cookbook. But this is an open issue and will take me a while.
Now, for your concrete question: The use of
http://purl.org/goodrelations/v1#ProvideService
is fine if the good you offer is providing a certain service.
Here is a full example:
<div itemscope itemtype="http://schema.org/Offer" itemid="#offer">
<div itemprop="name">Web Development Services</div>
<div itemprop="description">We build your Web site....</div>
<link itemprop="businessFunction"
href="http://purl.org/goodrelations/v1#ProvideService" />
<!-- Unit price -->
<div itemscope itemprop="priceSpecification"
itemtype="http://schema.org/UnitPriceSpecification">Price:
<meta itemprop="priceCurrency" content="USD">$
<span itemprop="price">50.00</span> per
<meta itemprop="unitCode" content="HUR"> hour
<time itemprop="validThrough"
datetime="2013-11-30T23:59:59Z"></time>
</div>
<!-- other offer properties follow here -->
...
</div>

Related

Offers in Products (schema.org / rich snippets)

I try to optimize the microdata/ schema.org/ rich snippet markup for product pages within some templates we use.
While doing so placed itemprop="offers" itemscope itemtype="http://schema.org/Offer" within a itemscope itemtype="http://data-vocabulary.org/Product"
Which should work according to
https://schema.org/offers
as well as
https://developers.google.com/structured-data/rich-snippets/products
but fails to validate on Google's Structured Data testing tool
Can someone give me some insight on which of the information I should focus?
The 'Offer' delivers some interesting properties I really would like to use within products.
Same goes for isRelatedTo which is mentioned on schema.org but fails to validate.
You are using the Product type and the offers¹ property from the vocabulary Data-Vocabulary.org, and the Offer type from the vocabulary Schema.org. (¹ I don’t know if Data-Vocabulary.org really defined an offers property; most of their site seems to be deleted.)
If you want Google Search to consume your data, you’ll want to use the vocabulary Schema.org.
Schema.org also has a type representing products (Product) and a property for referencing an Offer from a Product (offers).
In Microdata, this could look like:
<article itemscope itemtype="http://schema.org/Product">
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
</div>
</article>

How to implement "mainEntityOfPage" to this specific site?

Please take a look here: https://developers.google.com/structured-data/testing-tool?url=https%253A%252F%252Fglamourina.net%252Fen%252F
How can I correctly add mainEntityOfPage to this site?
In Google documentation example I see something like this:
<div itemscope itemtype="http://schema.org/NewsArticle">
<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="https://google.com/article"/>
But this is a single author blog. And it features blogPosts.
<article itemscope itemtype="https://schema.org/BlogPosting" class="singlearticles">
Would it be good if I change it like this:
<article itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="https://linktoarticle"/>
Not sure if I understand well the mainEntityOfPage usage. I would appreciate if someone can suggest how can I do to this specific case/website. Not generically, because each site can have a different mainEntityOfPage, but I need to know and understand the right implementation for this site.
About Google’s Microdata example
Google’s Microdata example is invalid. If the meta element has the itemprop attribute, the content attribute is required (details).
I described different ways how to specify mainEntityOfPage in Microdata, the most straigtforward one being a link element that creates a URL value (instead of another Microdata item):
<link itemprop="mainEntityOfPage" href="http://example.com/article-1" />
mainEntity
It’s easier to understand the use of mainEntityOfPage if we first look its inverse property, mainEntity.
For a WebPage that contains a BlogPosting, we could have:
<body itemscope itemtype="http://schema.org/WebPage">
<article itemprop="mainEntity" itemscope itemtype="http://schema.org/BlogPosting">
</article>
</body>
This means: There’s a WebPage and a BlogPosting, and the BlogPosting is the "primary entity" described in this WebPage. To denote this especially makes sense if there are more items involved, e.g., a Person describing the author, five more BlogPosting items for related posts, a WebSite item giving some metadata, etc. Thanks to mainEntity/mainEntityOfPage, consumers can learn what the primary/main item on that page is (i.e., what the page stands for).
mainEntityOfPage
The following example with mainEntityOfPage would result in equivalent structured data like the example with mainEntity from above:
<article itemscope itemtype="http://schema.org/BlogPosting">
<div itemprop="mainEntityOfPage" itemscope itemtype="http://schema.org/WebPage">
</div>
</article>
As you can see, the element for the BlogPosting item contains the element for the WebPage item. This is of course rather unusual markup.
But the mainEntityOfPage property does not only expect an (CreativeWork) item as value, it alternatively expects a URL. So instead of providing a WebPage item explicitly, you can provide the URL of the page instead:
<article itemscope itemtype="http://schema.org/BlogPosting">
<link itemprop="mainEntityOfPage" href="http://example.com/article-1" />
</article>
(This is what Google expects, according to their documentation for the Articles Rich Snippet.)
Excursus: URL of page vs. post
Many sites don’t differentiate between the URL for the web page and the URL for the blog post. For these sites it might seem silly to state something like
http://example.com/article-1 (the blog post)
is the 'mainEntityOfPage'
http://example.com/article-1 (the web page)
http://example.com/article-1 (the web page)
has 'mainEntity'
http://example.com/article-1 (the blog post)
But it can be useful anyway (e.g., for choosing which item is the primary one, because the other items won’t have this statement; or for a blank node; etc.).
However, some sites do differentiate (especially for Linked Data), so they might state something like
http://example.com/article-1#this (the blog post)
is the 'mainEntityOfPage'
http://example.com/article-1 (the web page)
http://example.com/article-1 (the web page)
has 'mainEntity'
http://example.com/article-1#this (the blog post)
Here, http://example.com/article-1#this represents the blog posting, and http://example.com/article-1 represents the page with information about this posting (or the content of the posting itself). A clearer example would be a person and a page about this person; or a building and a page about this building. See my answer for an example why you might want to do this. (But, as explained above, you don’t have to differentiate; you can use the same URL for both.)

Schema.org setup for multiple events on one page

Is there a proper way to show multiple events on one page in Schema.org? Ideally, we don't want a page for each event. Here is a sample structure of what we want:
<div itemscope itemtype="http://schema.org/Event">
<div itemprop="name"><h2>Chili Cookoff</h2></div>
<div itemprop="location" itemscope itemtype="http://schema.org/PostalAddress">
<h3><span itemprop="addressLocality">Manhatten</span>, <span itemprop="addressRegion">New York</span> - <span itemprop="addressCountry">US</span></h3>
</div>
<div>
May, 1st 2014 - May 4th, 2014
<meta itemprop="startDate" content="2014-05-1:00.000">
<meta itemprop="endDate" content="2014-05-4:00.000">
</div>
<div itemprop="description">An awesome chili cookoff you won't want to miss!.</div>
</div>
<div itemscope itemtype="http://schema.org/Event">
<div itemprop="name"><h2>Dinner on the River</h2></div>
<div itemprop="location" itemscope itemtype="http://schema.org/PostalAddress">
<h3><span itemprop="addressLocality">Brooklyn</span>, <span itemprop="addressRegion">New York</span> - <span itemprop="addressCountry">US</span></h3>
</div>
<div>
<meta itemprop="startDate" content="2014-05-1:00.000">May, 1st 2014 -
<meta itemprop="endDate" content="2014-05-2:00.000">May 2nd, 2014
</div>
<div itemprop="description">A dinner to remember forever.</div>
</div>
Using the Google Rich Snippits tool, it doesn't want to respect there being multiple events, but I am not sure if that means the crawlers will not notice them.
Your usage of Microdata and the Schema.org vocabulary is valid.
Every conforming parser will understand this. See for example http://linter.structured-data.org/, which shows snippets that could result from markup.
However, actual search engine providers decide for themselves if, when or how to use your annotations, for example for enhancing search results. It may be the case that some providers decide that they don’t "support" multiple items on a single webpage, where "support" only means that they, for example, don’t show an enhanced snippet on their SERPs.
This is different from provider to provider, their behaviour may change over time and it may depend on many other factors of your site, too. (Discussing such SEO-related things is typically off-topic on Stack Overflow, but Webmasters SE may be an appropriate place.)
Example: Google recommends to mark up all entities on a page:
When you have multiple entity types on a page, we recommend you mark up all entities on that page to help Google algorithms better understand and index your content.

how to use schema.org metadata on a review for multiple ratings?

I need to markup the review metadata for a product, but the review will have multiple ratings like service, satisfaction, quality, lifetime etc in the original schema.org documentation for review (http://schema.org/Review) there is only property/field: reviewRating using this i can only use it for one field but i need to provide metadata for all the fields, is there a solution for that?
Thanks.
Actually one property isn't an issue here since it can be used multiple times. There were a lot of discussions around cardinality of schema.org properties. You can dive into details here (issue at open tracker) and here (W3C Wiki page).
I personally follow the rule stated by Guha:
Right now, it is always allowed to have multiple values.
Another part of your question is how to describe different ratings. You can use mechanism of "multiple inheritance" like in "serious" programming language. That is one entity may have several types. In your case one type will be http://schema.org/Rating and another (quality, service, etc) you can get from any external to schema.org vocabulary. E.g., productontology is a good candidate (you can use http://www.productontology.org/id/Quality_philosophy, http://www.productontology.org/id/Customer_service accordingly). With RDFA you can just go with it - language itself provides all the necessary mechanisms to say that. But for microdata (and I bet you're using this one) you need to do "dirty hack" and use additionalType property.
So simple example of what you need is smth like this:
<div itemscope itemtype="http://schema.org/Review">
<span itemprop="name">Not a happy camper</span> -
by <span itemprop="author">Ellie</span>,
<meta itemprop="datePublished" content="2011-04-01">April 1, 2011
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="additionalType" content="http://www.productontology.org/id/Quality_philosophy">
<meta itemprop="worstRating" content = "1">
<span itemprop="ratingValue">1</span>/
<span itemprop="bestRating">5</span>stars
</div>
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="additionalType" content="http://www.productontology.org/id/Customer_service">
<meta itemprop="worstRating" content = "1">
<span itemprop="ratingValue">5</span>/
<span itemprop="bestRating">5</span>stars
</div>
<span itemprop="description">The lamp burned out and now I have to replace
it. </span>
</div>
And Google validator sees all the data.

Where to define schema.org itemtype for Article type: html, body, or div tag?

I have article pages where the only content on the page is the article. When marking up pages with schema.org microdata, is it best to define the itemscope and itemtype at the very top in the <html> tag? Or in the <body> tag? Or a <div> in the body? Or does it not matter?
Example of defining in <html> tag:
<html lang="en" itemscope itemtype="http://schema.org/Article">
<body>
<div>
<span itemprop="name">How to Tie a Reef Knot</span>
...
</div>
</body>
</html>
Versus a <div> in the body:
<html>
<body>
<div itemscope itemtype="http://schema.org/Article">
<span itemprop="name">How to Tie a Reef Knot</span>
...
</div>
</body>
</html>
Is one better than the other in terms of SEO? It seems like it would be best to define it as close to the top of the page as possible (ie, <html> tag) so the search engine spiders pick it up immediately.
If you inspect this very page, you will find that the html tag does indeed include schema.org metadata
<html itemscope="" itemtype="http://schema.org/QAPage">
Not everyone does this, but stackoverflow is a top 100 website- take that for what its worth.
Obviously, you will want schema.org metadata throughout the page as well.
Doesn't matter, in the sense that either will work and neither is "wrong". Where you put these things depends very much on what information's on your page, and how it's arranged (e.g., some schemas can't go inside certain other ones). However, though it's actually implied, you might want to put WebPage on the body element, be more specific from there on down through your page code.
There's absolutely no difference in terms of SEO, partly because it doesn't matter if the microdata is parsed a fraction of a microsecond earlier, and partly because only a few select bits of microdata are currently used by major search engines (of which Article isn't one), and Google have explicitly stated there's no effect on ranking (yet).
You need to put that on div tag as your article is enclosed under it at the lowest level..so when a search engine spider will crawl your page, it can more appropriately index your article content..
Although your pages contain only articles but still they may contain other portions such as menus, author information, etc.