Linking up Schema markup in different pages - seo

So, how good is Google and other search engines in linking schema markup in different pages of the same website?
I am marking the home page with an Organization type.
{
"#context":"https://schema.org",
"#type":"Organization"
"#id":"https://example.com\/#organization",
"legalName":"My company",
"email":"contact#example.com"
}
And the page of every individual course offered is being marked with a Course type.
{
"#context":"https://schema.org",
"#type":"Course"
"#id":"https://example.com/course/1#course1",
"description": "Webmaster"
}
Can I count on google and other search engines to understand that Course "Webmaster" is being provided by the Organization "My company" describe in the home page?
I mean, they are both defined in the same website, it should be obvious.
Now, I could define the Organization type in the Course's author property.
{
"#context":"https://schema.org",
"#type":"Course"
"#id":"https://example.com/course/1#course1",
"description": "Webmaster",
"author": {
"#context":"https://schema.org",
"#type":"Organization"
"#id":"https://example.com\/#organization",
"legalName":"My company",
"email":"contact#example.com"
}
}
I also could define both types one alongside the other with the graph property.
{
"#context":"https://schema.org",
"#graph": [
"#type":"Course"
"#id":"https://example.com/course/1#course1",
"description": "Webmaster",
},
{
"#context":"https://schema.org",
"#type":"Organization"
"#id":"https://example.com\/#organization",
"legalName":"My company",
"email":"contact#example.com"
}
}
But do I need to? Can't google infer the relationship between this types simple based on the fact that they are defined in the same website?

how good is Google and other search engines in linking schema markup
in different pages of the same website?
As good as you tell them.
Can I count on google and other search engines to understand that
Course "Webmaster" is being provided by the Organization "My company"
describe in the home page?
To create related data, it can be important to start with the hierarchical structure of the content of the web page that represents the course. If the subject of the content is a course, it may make sense to explicitly specify the name and description of the course in the content. Since every course has a provider, it also makes sense to specify the name of the course provider as a sub-subject of the entire course.
From the main content with the hierarchical structure of the course - the provider to easily navigate to associated data. Google's General structured data guidelines tell us:
Relevance Your structured data should be a true representation of the
page content.
The type Course can be specified as a top-level structured data type and this type will represent the subject of the webpage main content. This type has a provider property in which you can nest markup for the type Organization.
At this step, you must again return to the main content. If the course presented in the content has one specific provider, it may make sense to include complete information about the provider's organization in the content of the web page. The same applies to many of the courses presented on separate webpages that have separate providers. However, if many courses have only one provider, then it makes sense to represent the provider organization in the content of a separate web page and for all references to the provider name for the individual courses, simply link to the web page representing the provider organization. This will canonicalize the provider organization and eliminate duplicate content. In the content representing the organization of a provider, you can specify all courses offered by that provider that is available at the level of the entire website. And create backlinks to the separate web pages that represent these courses. This will create a link between the provider and the courses they teach.
At this point, we can go back to structured data and use the main content:
If there is only one provider of the course and full information is indicated in the content of the web page, then in the structured data, it is necessary to indicate complete information about the provider's organization, e.g.:
{
"#context":"https://schema.org",
"#type":"Course",
"#id":"https://example.com/course/1#course1",
"name": "Webmaster",
"description","zzzzz",
"provider":{
"#type":"Organization",
.... (full info)
}
}
If the content has a link to a separate web page representing the provider's organization, then in the structured data you can only specify the provider's name and the link to the web page, e.g.:
{
"#context":"https://schema.org",
"#type":"Course",
"#id":"https://example.com/course/1#course1",
"name": "Webmaster",
"description","zzzzz",
"provider":{
"#type":"Organization",
"name": "Webmaster",
"url":"https://example.com/provider"
}
}
For structured data representing the provider's organization on a separate web page, it may make sense to specify courses offered using properties hasOfferCatalog or makesOffer, and embed the required types with backlinks to web pages with separate courses.
All of the above can provide related data that represent the course or courses offered by a particular provider organization.
The Google recommendation can help to create relevant structured data:
Completeness
Specify all required properties for your rich result
type. Items that are missing required properties are not eligible for
rich results. The more recommended properties that you provide, the
higher quality the result is to users. ...Rich result ranking takes
extra information into consideration.

Related

shema.org structured data type for driving instructor or other learning center

Trying to find a proper type of structured data for driving school/driving instructor. According Google recommendations "Use the most specific LocalBusiness sub-type possible; for example, Restaurant, DaySpa, HealthClub, and so on."
Looking at LocalBusiness sub-types
More specific Types
AnimalShelter
ArchiveOrganization
AutomotiveBusiness
ChildCare
Dentist
DryCleaningOrLaundry
EmergencyService
...
there is nothing related AutomotiveBusiness maybe can be used, but its sub-types are more related to the machinery, but not the education side.
Looking at Organization branch, there is EducationalOrganization, but there is nothing for additional learning courses
Any suggestions?
The semantics of a hierarchical structure with HTML heading elements for your web page, the content of which your business represents can help.
The most important element such as H1 represents the subject of the content, which in your case is the name of your business.
This business of yours offers services such as driving courses. The name of these courses can be specified as the content of element H2 or H3, if element H2 is already in the content, for example, it can be something similar to "Our services or offers".
Based on such a hierarchical structure, you can create your structured data and this will meet Google's requirement:
Relevance
Your structured data should be a true representation of the
page content.
Thus, it might make sense to set your top-level type such as LocalBusiness, and specify the business name, legal business name, business description, and other properties that you can find in the Schema and Google documentation.
To specify your courses, you can use the makesOffer property and embed the Offer type to this property, which in turn has an itemOffered property in which you can nest the Course type. This can be a good solution for a list of your courses, which you can represent in structured data as an array.
Also, you can use subjectOf property for Course type embed.
In turn, the Course type has the property such as provider in which you can set the name of your business and this will create a reciprocal link between your business and the course (s) that the business offers, i.e. create linked data.
If the page content has a call to action, then you might consider embed the OrganizeAction type in the potentialAction property.

Best Approach for integrating Microdata schema.org

I am developing a simple website and want to implement microdata on it.
The website is for a local business and simply has the default structure (about, services, contact, etc..).
My question is if microdata can be cloned on every page or if I should change from page to page. Logically I would say that I should change from page to page, but on the other hand information like facebook page, twitter and map will keep the same so I don't know what should I do.
I take the chance to ask if there is any better category to list a software company, I am using local business but maybe there should be better ones that I am missing (this applies for meta description and keywords also on the different sections of the site)
You should declare only the start- or contact/aboutme site with your Local Buissiness Information.
On all other site depend on the content like article, product etc.

Google Places Autocomplete - Clarification on content locale

I have a question regarding the content locale of the Google Places API. In my application, we use Places Autocomplete, and when user chose the specific place, we then use Places Detail API to fetch the information
about the place. Please note, that i've not restricted the places "type" in autocomplete.
Consider this example, "Grant Hyatt Hong Kong" the places autocomplete returns the suggestion. The suggestion has the Place ID as "ChIJ7VpqmF4ABDQRi1SbdlsRfys"
Using the place detail API, https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJ7VpqmF4ABDQRi1SbdlsRfys&key=&language=en, the content has information in english and chinese.
--------------------------
"address_components" : [
{
"long_name" : "灣仔",
"short_name" : "灣仔",
"types" : [ "neighborhood", "political" ]
.................
.................
"name" : "Grand Hyatt Hong Kong",
},
--------------------------------
However, when i perform the search using Geocode API,
http://maps.google.com/maps/api/geocode/xml?address=Grand%20Hyatt%20Hong%20Kong,%20hong%20kong, i get the content completely in english. I notice that the Places ID returned in this case, is different from the Places API autocomplete service.
Clearly, the google's database has the information about this place in english. As per the places documentation, the google place API, attempts to return information in the requested locale. In this case, the google's database has the information in english locale.
Why is this difference in the case of Places API?
I can address only one part of your question. Why Geocoding API and Places API search return different results?
Geocoding API doesn't take into account any business, so the result that you get is a different object with place ID ChIJUzElmV4ABDQRyXzjJRwo3VE. This is a compound building that Geocoding API can localize and you can see this building in Map Maker:
https://mapmaker.google.com/mapmaker?gw=90&iwloc=0_0&dtab=history&cid=5898915188285078729
Places API can find a business with place ID ChIJ7VpqmF4ABDQRi1SbdlsRfys. You can see the corresponding feature with the category Hotel in Map Maker:
https://mapmaker.google.com/mapmaker?gw=90&iwloc=0_0&dtab=history&cid=3134242950202741899
Referring to translations, I believe you should raise this issue with Google data team.
Please use the "Report a problem" link on the bottom right corner of the maps.google.com as specified in:
https://support.google.com/maps/answer/162873
Hope it helps!

Designing an efficient rest API

I'm trying to design a REST API over HTTP. I am totally new to this, so please tell me if any of my assumptions or ideas are just plain wrong.
The domain is minimalistic. I have a database of Products and for each Product there is an associated Image. As I see it, I can design my API in one of two ways:
I can bundle each image with its product and represent them as one resource. The cons of this api would be that every time you PUT or GET a product, you have to send the image over the wire, even if you don't specifically need to read or change the image. As of my understanding, it would not be RESTful to not PUT or GET a complete representation of a resource. Also, client-side caching of images would be of no use in this scenario.
I can model Products and Images as two different resources. When you GET a Product, it will contain an image_id which can be used to GET an Image. This model would require two HTTP Requests. One to GET the Product and one to GET its corresponding Image. Not so bad maybe, but what if I want to display a list of all Products along with their Images? Then I suddenly have a bunch of HTTP Requests. While using SSL, I guess this could create a performance issue. Good thing though, is that the consumer of my API could choose to cache images client-side.
So, how can I model my API to be both RESTful and efficient?
It's good that you're thinking about the data model.
Related to that, REST doesn't specify or imply that the data model must be completely de-normalized.
Typically, when GETing a resource, you'd receive a packet of information that also includes URL references to other related resources, like a product image. It could also include a reference to a product category, a product manufacturer, and so on. Each might be URLs, or IDs that you could derive URLs from. A message like this:
{
"id": 123456,
"description" : "Your basic paperweight",
"category" : { id: 17717, "name" : "Home furnishings" },
"manufacturer": { id : 78783, "name" : "Boeing" },
"price" : 1.99,
"imageId" : 109101
}
...might imply URLs like this:
http://api.mycompany.com/product/123456
http://api.mycompany.com/category/17717
http://api.mycompany.com/manufacturer/78783
http://api.mycompany.com/image/109101
...and note that the full representation of the linked-to resources, like category, manufacturer and so on, is not transmitted with the original resource. This is a partially de-normalized data model.
In regard to your comments on PUT:
This is a matter of opinion, but... for many developers it's completely acceptable to allow partial update via PUT. So you could update the resources without specifying everything; existing fields would remain unchanged. If you choose this behavior, it can complicate your (server-side) code when dealing with edge cases. For example, how does a client indicate that he wants to erase or delete a field? (Passing null may work, but for some data, null is a meaningful value.)
Why worry about PUT? If you want partial update, it's easy to use POST, with a verb (eg, "partialUpdate") in the query params. Actually this is what Roy Fielding advocates, and it makes sense to me.
A partial update would then be something like this:
POST /products/123456?action=partialUpdate
*headers*
{
"description" : "A fabulous paperweight designed in Sweden, now at a new low price." },
"price" : 1.78
}
I would use option 2, but instead of image_id, store the image URL. Also, don't be afraid to use custom scripts to return what you need (for example, displaying ALL products and images). REST is a design GOAL, not necessarily an implementation truth. Your design would still be RESTful.
I agree with the other 2 answers and I think that you should choose option number 2. But you also asked about getting a list of products, so here is my answer regarding it.
Think of using another resource that can be used with GET only, that resource will return a list of products. In this way there would be only one HTTP request for consuming the list. In case that there is a chance that the list can be very big, you would need to implement some kind of paging mechanism.
For example, lets say that you need to return 2500 products but you decided to return no more than 1000 products. The first GET request would return the first 1000 items and would also include in the answer the URL to consume the next "page", in this case the next 1000 products, then in the second request you would return products 1001-2000 with a URL to the next "page", in this case the last 500 products.
Then the consumer would be able to get the images as well if needed. You can use this list option for the images as well, but the bunch of images should be significantly smaller in each "page". I would not recommend of choosing the list mechanism to consume images.

designing a restful api: naming URIs, custom headers?

EDIT: I've solved my issues (for now at least).
I've recently been working with the Zendesk REST Api and their use of the custom "X-On-Behalf-Of" header for looking up tickets opened by a particular user got me thinking about Restful Api design choices (in no specific language, more of a how to name URIs question). I've also read this related question on Custom HTTP headers, but it left me with more questions than answers.
Say I have an example restful web service dealing with rental apartment applications where clients use Basic Auth (keep it simple) to authenticate. Define the basic data as such:
Users (can be of type landlord or renter)
Forms (which consist of one or more Document resources and some form meta data like form name and version info)
And then some type of resource corresponding to Rental Applications, which ties together Forms, Applicants (one or more renters), Landlord, and some metadata like status and dates.
I'm struggling to properly model the URIs for the Applications resource in general, and more specifically with respect to a clients role. (assume api root is https://api.example.com/)
How do I allow a Landlord to fetch a list of applications sent to them? My intuition says make a request to "GET /applications" and Basic Auth lets the server know which user to build the list for; likewise "GET /applications" requested by a Renter would return a list of applications they've sent...but I'm not confident this is a solid design in general to mix and match sender vs. recipient lists at the same URI. Should I be thinking about the "/applications" resource differently, and perhaps allowing a hierarchy like "/applications/[USER_IDENTIFIER]" for each user instead?
Also, regardless of my applications URI design, assume a Landlord is able to create an application on behalf of a renter. Is this better accomplished by sending a custom header like "X-Create-On-Behalf-Of: somerenter#example.com" with the PUT/POST creation request? Or should my schema define a field which allows for this alternative scenario.
I'm very much an amateur at this, so I'm open to any criticism of my assumptions/design, as well as any pointers for learning more about designing RESTful api's. Thanks for reading.
I think I've found a solution.
Landlords and Renters are really just subclasses of the same object, which I'll call Party (as in party to a transaction, not birthday party). So then each one has their own resource, named like /party/PARTY_ID.
It's easy to extend this to see that /party/SOME_LANDLORD/applications and /party/SOME_RENTER/applications solve my issues. It also removes my need to consider custom headers.