Schema markups, my Journey and what i have learned

The first time i heard about Schema markups was back in August 2018, new customer, when Google’s health update hit us. i was looking for a way to rank higher, top the SERP and give the customers product pages a “volume” and stand out, i started learning about Schema markups, not realizing yet the full potential or what they being used. when i started learning about schemas and applying them,my first go was using Google’s tool, Structure data markup helper, when i wanted to customized the schemas i then was looking for a different way to build the schema markups and so i started using schema markup generators tools offerede by various websites, and adding the generated schema to a Google tag manager custom. this led to,now, almost two years learning process and experemintation of structure data and schema markups. Here is my journy and what i’ve learned. what are schema markups? “Schema.org is the result of collaboration between Google, Bing, Yandex, and Yahoo! to help you provide the information their search engines need to understand your content and provide the best search results possible at this time. Adding Schema markup to your HTML improves the way your page displays in SERPs by enhancing the rich snippets that are displayed beneath the page title. “Source: Moz How do one apply them? Schema markups are available in 3 formats:2 of the schema formats comes in a form of a predefined HTML tag, a piece of an HTML code, from a list that exsit on Schema.org, and then added to a pages’ HTML code.the third format and the one that is recommended by Google, is JSON-LD, that is implemented in a javascript code that is also, added to the HTML code of a page. in all 3 formats,each schema (tag) its uses, structure and examples of the schema can be found on its schema page on schema.org. The schema markup as mentioned above, are a way to describe to a search engine what is visible to the user on the page, and what is the page about, and that is also why using the right schema on its matching page is important! for example, the use of “Article” schema on a page that is not an article, or marking up your local business and location on a page that does not include these details, another example adding a breadcrumbs schema on a front page that is often does not include a breadcrumb and so on… and so: here is what i have learned about schema markups: 1.Welcome to Wonderland, Schemas can be a rabbit hole when you think you’ve covered all the fields to add to a schema or added all schemas to all pages, there is always another way to optimize rebuildand and add another field. 2.there are three formats of structure data: 1.Microdata2.RDFa3.JSON-LD – Recommended by Google   Schema markup types, more in detail and examples: Microdata+RDFa: Applicability 

  MicrodataMicrodats, like RDFa, used within an HTML tag. you would often see them as part of an HTML tag looking something like this: The basic: HTML Code: 

My name is Sarah.

 the tag “itemscope” create an “item” and the “itemprop” gives it a value of (in this case) “Sarah” A more common example:  a “Local Business” Schema: HTML Code: my Company  the tag “itemscope” create an “item” the “itemtype” tells Google where to look for the information about this schema you are creating,in this example this is an “Local Business” Schema, then we continute by adding an itemprop “name” which telling we are going to be giving the business name e.g “content=”The Company” and we also adding a business logo which is being added with src=”logo.png” and with the alt tag for the logo “alt=”my company”. To Break it down:Microdata is being applied by adding tags like “itemscope” and “itemprop” to an HTML code to “Mark” to the crawlers that it is a part of a schema. 

For us SEOs the basic, like H1 title, such as an article title, looks like this

My article

, so with microdata mark up it will look like this

My article

with itemprop=”name” marking the articles “Name”.

 To read more about the guidelines go to: https://developers.google.com/search/docs/guides/sd-policies I often find that Theme and plugins developers add, in their core code, some schema markups with a universal code that will match infromation given in the schema markups to any website it is being installed on.   for example,a Breadcrumbs schema that will automatically collect your page titles and second level stucture in inner pages and will “auto complete” it into the schema so Google will see the final result ready, E.G “BreadcrumbList” position: 1, @id: https://example.com, name:”homepage”, position 2, @id: https://example.com/services/ name:Services.in that example position 1 is your homepage, position 2 is the second page you (or a crawler ) is currently viewing, in this case, “Services” page, position 2 can be the “About” page and so on. For the average website builder, that could be useful, prevent the need do it yourself, and to avoid touching code, or hire a developer to do so, but sometime it could create “broken” schemas, which Google will flag warnings or errors when finiding them. to sum it up, Microdata is an easy and very common to see way to implement Structure data and is being done by adding tags to the prexisting HTML code of a website.Microdata vocabulary can be found on https://schema.org/ and often includes examples of implementations of a specific desired schema.  RDFa:

” An HTML5 extension that supports linked data by introducing HTML tag attributes that correspond to the user-visible content that you want to describe for search engines. RDFa is commonly used in both the head and body sections of the HTML page. “

 or more specific, described by the website rdfa.info :

” RDFa is an extension to HTML5 that helps you markup things like People, Places, Events, Recipes and Reviews. Search Engines and Web Services use this markup to generate better search listings and give you better visibility on the Web, so that people can find your website more easily. “

 The same as Microdata, RDFa is within an HTML tag, in order to better describe what is visibile within the page and we want to deliever to the users and crawlers, RDFa is more specific, to markup things like People, Places, Events, Recipes and Reviews.     To sum it up, RDFa from what i have seen is a less common, and im my opinion a bit more complex way to add schema markups to your HTML, and being done by adding pieces of code and sources for the crawlers to read. Microdata and RDFa both syntaxes define attributes that get added to your existing HTML elements. More indepth info can be found here:difference between schema markup typesdiffrence between microdata and RDFa Json-LDa javascript code, begins with and in between there will be the actual schema code which also often starts with a curly braces followed by” “@context”: “http://schema.org”, “@type”:” “, and will end with curly braces wrapping the schema right before the closing the code. Json-ld is the recommended format by Google, and offers much more customization and flexability.    2.another PHP command that is nativly exsist in the WordPress system, wp_json_encode().here is how to use it: function generate_json_ld_webpage() {  if ( is_page () ) { return null; } $datawp = [];  $datawp[“@context”] = “https://schema.org”; $datawp[“@type”] = “WebPage”; $datawp[“url”] = home_url( add_query_arg(null, null)); $datawp[“name”] = get_the_title(); $datawp[“inLanguage”] = “en-US”; $datawp[“datePublished”] = get_the_date( ‘c’ ); $datawp[“dateModified”] = get_the_modified_date( ‘c’ ); $datawp[“description”] = get_the_excerpt();   echo ”;} add_action( ‘wp_head’, ‘generate_json_ld_webpage’ ); To break it down:1. a function is being generated, in this came it is named “generate_json_ld_webpage” followed by required “()”.2. the next part if ( is_page () ) {  return null;  } deteremine at what condition and where the code will be deploied , in this example, if the page is a regular page (is_page) and not a post, deplay the following code. 3.this part requires more understanding of code and how PHP works, a simple way to put it is that each field of the schema is being stored into a greater collection of data.in this example the collection of data is named “datawp”(random picked name, can basically be named anything desired), and each field of the schema is being stored to it and also includes the value of that field, for example $datawp[“@type”] = “WebPage”; ” stores the type and also gives the types value that this schema is a WebPage schema, the rest of the fields in the example are WordPress built in functions, “get_the_date(‘c’)” pulls out the date published from the WordPress system automatically, same for ” get_the_modified_date( ‘c’ ); “, ” get_the_excerpt(); ” pulls the excerpt of the page, if one exsist, “get_the_title” pulls the current page title, these functions are useful since they are universal and should be working on any wordpress system and on any page without the need to menually add the title/date/url/name of each page and basically autocomplete the required field.more options to “auto complete” fields can be found in wordpress codex here.4.echo, followed by the  and to sum it all up,which ever way you decided to implement a schema markup, test, adjust, add and customize. with the ever growing of websites and pages to crawl, and the ease of building one today, Google cannot keep up with the rate and the amount of pages that are available on the internet, therefore, implementing schema markups and helping the Google crawlers understand what is on the page and what it is about is highly recommended to help a websites’ crawling “Budget”. lastly, i would like to introduce my very own solution to schema markup, in a form of a WordPress Plugin, i call it Schema MarkApp, the idea behind the name is the code i’ve used to create the schema, most schemas, as complecated as they are, using wordpress codex, populate the schema fields by themselves, “automatically” which makes the use of the plugin, like an app, easy. As of writing this guide, Schema MarkApp is still under Beta BUT available to anyone willing to try it out, registration is available via Schemamarkapp.com/register/ More info about the plugin can be found on the plugin website, schemamarkapp.com.  Now that we know about schema markups and how to implement them, here are a few common schemas SEOs and website owners use. First, a few important notes: 1. Google does not support all available schema markups, in fact, Google created a list named “Search gallery” where they list all the schemas that the search engine supports. 2.Not supporting a certain schema does not mean Google cant “read” them. the schema markup tester tool will be able to read the schema markup added, even if not supported, and will flag an error if anything is not “supported by Google” 3.adding unsupported schemas to a website will not “hurt” it, Google will simply ignore it, and will not flag an error in search console. with that said, the shema implemented needs to be testerd first and need to be valid with no errors and preferably with no warnings, same as if done with a supported schema. 4.*Opinion*, since adding unsupported schemas does not “hurt” the website, and according to Googles guidelines. adding multiple schemas is not a problem, i would recommend adding all revelvant schemas to a page. for example, a page is a webpage but could also be a service page, so it can include both a service schema and a webpage schema and more if it is relevant, a post can be an aritcle, and can also include a recipe, meaning a recipe schema should also be in place, and so on, all elements can/should be markedup.  Common used of Schema in SEO. aside from a few schemas in Google’s search gallery, all schemas could in potential visually effect the SERP.

Leave a Reply

Your email address will not be published. Required fields are marked *