A Beginner’s Guide to Schema Markup Code (for Local Optimization)

December 07, 2016 by BizTraffic Team

schema markup code

Even if you don’t manage your own search engine optimization efforts, a cursory knowledge of Schema.org markup code (and some best practices for feeding data to search engines) can help you to streamline your local SEO efforts or better communicate with your SEO provider.

We spend dozens of hours tweaking our websites in hopes of implementing the perfect keywords, writing compelling content, and creating the optimal user experience, yet we frequently neglect to consider how search engines actually process all of our hard work. Having a basic knowledge of how search engines understand the information that you put on your website can be an enormous asset for any business owner, enabling you to optimize what search engines know about your business.

What’s Schema and why should I care?

  • Schema is special code that you can add to your website to help search engines better understand your business.
  • Schema can include vital information like your business’ name, address, phone number, or hours, as well as highly specific particulars like the products or services that you offer, category information (e.g. “vintage guitar store” instead of “music store,” or, worse yet, “retail business”), or even calls-to-action from your business! 

If used properly, Schema can enable your business to have a more information-rich integration with search engines. Businesses that make efficient use of markup code on their websites are rewarded with rich snippets on their search engine results pages (SERPs), in addition to the possibility of improved SERP rankings. Have you ever noticed a special box appearing in your Google results (like the one below)?

rich snippets schema markup code

The image above is Google’s knowledge graph card for BizTraffic, one of the perks of providing rich information to search engines. As you can see, rich snippets allow consumers who find your business through search queries to see all of the vital information in one handy space: who you are, what you do, where (and when) you do it.

Consumers can even take advantage of special buttons on the knowledge graph to call your business, get quick directions to your location, or, for some businesses, take advantage of calls-to-action (e.g. a “make a reservation” button for a restaraunt)!

You might be asking yourself “who should use Schema?” Everyone! Schema markup is a best practice for any business’ website optimization; the better you can help search engines to understand your business, the more likely consumers are to find you in their queries. While you may not see the effects of implementing markup code right away, but, over time, your website will continue to improve in SERP ranking due to the rich data that you’re providing to search engines. Additionally, optimizing your website with markup code can help you to be better prepared as search engines roll out new changes in how they comb the net for information.

How to NAP with Schema

Getting started with Schema markup can be a headache, especially if your coding experience is lacking. The algorithms that search engines use to understand your business rely heavily on three key pieces of information: your business’ name, address and phone number (or NAP). Here, we’ll go through some of the basics of implementing markup code on your website, starting with your NAP.

JavaScript Object Notation for Linked Data (JSON-LD) is JavaScript that you can place anywhere on your website. It allows you to implement Schema markup without having to change the content (or appearance) of your pages.

As a best practice, the optimal place to add markup code would be your site footer, since that will ensure that the code will persist on all pages.

Adding markup code is actually a pretty painless process. Here’s an example of Schema code for BizTraffic:


<script type
='application/ld+json'>
{

   "@context": "http://www.schema.org",
   "name": "BizTraffic, LLC.",
   "address": {
     "@type": "PostalAddress",
     "streetAddress": "17766 Preston Rd",
     "addressLocality": "Dallas",
     "addressRegion": "Texas",
     "postalCode": "75252"
   },
   "telephone": "(469) 892-8895"

}
 </script>


Pretty simple, right? You can see that every line here presents information that search engines can parse in the form of structured data.

Even though you may already have your NAP data proudly displayed on your website (without even touching Schema), it’s highly beneficial to include this information in the Schema markup to ensure that search engines can show potential customers more about your business.

Next, let’s look at some more specific information that Schema can let you provide to search engines. Here we add lines to encode business category, website, and logo data:

   
   "@type": "LocalBusiness",

   "url": "http://www.biztraffic.com",
   "logo": "http://biztraffic.com/wp-content/uploads/2012/12/BizTrafficD72aR09aP02ZL-Carter9a-e1355954171531.png"


Great! Now we’ve got some more specific data about our business for search engines to pick up. Some other important fields that we could consider adding would be our business hours, who owns the business, and maybe a fax or toll-free phone number. All of this is just beginning to scratch the surface of what you can do with markup code!

Using Schema to create information-rich, highly specific data

In the example above we coded a field for business type, referring to BizTraffic as “LocalBusiness;” however, this category isn’t very specific. So what should you do if you want to add a more distinct category (or “schematype”)

As a first step, you could use a relevant category database like Moz Local’s handy category list get get some specific ideas. There’s even a great spreadsheet (created by David Deering) that consolidates Moz’s categories into corresponding schematypes.

Still, looking over these lists, it looks like the schematype that we really want (something like “internet marketing service”) doesn’t exist. Fortunately, there’s a simple solution called Productontology that will help us specify our business schematype (as well as services and products offered, if we want to add that information later).

To use Productontology, we’ll need to find a relevant category for our business on Wikipedia. Using the digital marketing page, we take the URL for that page and convert it into our Productontology link:

http://en.wikipedia.org/wiki/Digital_marketing → http://www.productontology.org/id/Digital_marketing


We can now add our new schematype to our code. Here’s what our complete markup looks like:


<script type
='application/ld+json'>
{

   "@context": "http://www.schema.org",
   "@type": "LocalBusiness",   
   "additionalType": "http://www.productontology.org/id/Digital_marketing",   
   "name": "BizTraffic, LLC.",

   "address": {
     "@type": "PostalAddress",
     "streetAddress": "17766 Preston Rd",
     "addressLocality": "Dallas",
     "addressRegion": "Texas",
     "postalCode": "75252"
   },
   "telephone": "(469) 892-8895"
   "url": "http://www.biztraffic.com",
   "logo": "http://biztraffic.com/wp-content/uploads/2012/12/BizTrafficD72aR09aP02ZL-Carter9a-e1355954171531.png"

}
 </script>

Trust, but verify (your code)

As a general practice when coding, you should always test your code before you implement. Fortunately, there are several structured data validators that make it easy for you to double-check your Schema markup code.

Using a structured data validator is key, since it can be very easy to make mistakes that will prevent all of your hard work from being picked up by search engines. You can even use the validator to see suggestions for additional information that you should provide in your code.

Concluding thoughts

Now that you have a grasp of some Schema basics, I’m going to let you in on a secret: there are several excellent Schema markup generators available online that can help you create and format code for basic structured data implementation for free. These can be great if you’re having formatting issues or if you just want to quickly create some markup code to play with.

If you want to get really gung-ho with your markup strategy, there are even paid apps like Schema App that can “create, deploy and monitor the health of your structured data.” Advantages of using these apps include a user-friendly interface and easy integration with content management systems (like Wordpress) through plugins.

Using Schema markup code can be a key component of your local optimization strategy. You can improve your SERP ranking and even be rewarded with rich snippets by creating information-rich data with markup code.

 

If you're looking for more information on how to optimize your local business' web presence, download our free ebook:

Download Local Optimization Ebook Horizontal CTA

 

Filed Under: SEO, local search, local business, schema