Knowledge Base

/

Improve Discoverability

/

Implementing Schema Markup Code

By
James Gibbons

Learn What is Schema Markup Code and How to Implement Schema for SEO

Implementing Schema Markup for SEO

If you're looking for a robust way to optimize your website for search engines, then you need to understand the importance of schema markup. Schema is code that helps search engines understand a website's content. Adding schema markup to your web pages can significantly improve your website's SEO performance and increase its visibility in search engine rankings.

​​Despite the clear benefits of schema markup, there are some challenges associated with its implementation. The main challenge is that it can be difficult to know where exactly to add the schema markup code on your website. However, there is a recommended format for implementing schema markup that can help ensure the indexation and ranking of your website by search engines. 

Learn how to implement schema markup correctly and why it is essential for SEO in this blog. We'll also discuss how you can use schema markup to improve your website's visibility in search engine rankings.

Quattr Scores

of this article

Keyword Relevance

74

Content Quality

90

Check your content's score now!

Benefits of Implementing Schema Markup

Schema markup is code (semantic vocabulary) that you put on your website to help search engines return more informative results for users. This code helps search engines understand the content on your web pages and display it in a more helpful format, like rich snippets

It can show reviews, events, people, products, businesses, and more. Schema markup is part of structured data and is organized content that computers can easily read. Learn more about structured data here.

Schema markup code adds additional information to web pages that help search engine bots better understand your content. It can include information such as the web page's name, address, phone number, type of product or service, and more. 

By adding this information to your web pages, you can explicitly tell search engines which keywords and phrases they should consider when indexing your website. Schema allows search engines to display your website more accurately in search engine results pages (SERPs), ultimately increasing website traffic and leads.

While adding schema markup to your website has several benefits, one problem must be clarified for everyone. It may only sometimes be apparent where you should place the code or which tags to use and ensure search engines correctly interpret the code. 

Types of Schema Markups

Schema markup is an essential tool for B2B and B2C businesses to help search engines better understand their content. Many schema markup types are available, and each has a unique purpose and application. Here's a list of the most common types of schema markup that B2B and B2C companies should consider using: 

1. Article schema: Article schema helps search engines identify content as news articles, blog posts, or other content published regularly. 

2. Event schema: Event schema helps search engines identify events, such as concerts, conferences, or webinars, and display them prominently in search results. 

3. Product schema: Product schema helps search engines identify products and display them with detailed product information in search results, such as price, ratings, or availability. 

4. Local business schema: Local business schema helps search engines identify local businesses and display them prominently in local search results. 

5. Video schema: Video schema helps search engines identify videos and display them prominently in search results. Video schema code can benefit B2C companies with many videos on their websites. 

6. Breadcrumb schema: Breadcrumb schema helps search engines identify the structure of a website and display it in search results. Breadcrumbs can enhance the website navigation of B2B websites with complex structures and hierarchies. 

7. Organization schema: Organization schema helps search engines identify an organization and display it prominently in search results. B2B and B2C companies can leverage organization schema code to make their organization or brand more visible in search results. 

Find the full list of schema here.

By using the correct type of schema markup, B2B businesses and B2C companies can gain a competitive edge in the search engine results pages and ensure their content is indexed correctly and displayed.

Why Use Schema Markup for SEO?

Good SEO is the key to driving more traffic to your website, and schema can effectively achieve better search engine optimization. Schema code is a type of structured data markup that helps search engines better understand the content on your pages. It gives search engines the information they need to correctly interpret the purpose of your website and its content, which can result in higher ranking positions and more visibility in search results.

Schema can target keywords, provide rich snippets in search results, and increase click-through rates. Rich snippets are the extra information that can appear at the beginning of a search result listing, including star ratings and customer reviews. This information is more likely to attract users to a website, as they can make an informed decision based on the additional information they see. 

You can use schema to target specific keywords by formatting content so that search engines can understand the page's purpose. Enhancing web pages with schema can result in higher ranking positions for the page in search results and improved website content visibility. 

Using schema is also essential for local SEO. Local businesses can use schema markup to provide their location, contact information, opening hours, and other information that search engines need to understand the relationship of the page to the local area. Schema for local SEO can lead to higher-ranking positions in local search results and more visibility for local businesses. 

In addition, website admins can use schema to help display content in other formats, such as video or audio, which helps improve the user experience and can lead to higher click-through rates.

Schema markup code can be a powerful tool for SEO, as it helps search engines better understand the website's content. As a result, pages can be properly indexed and ranked in search results, improving visibility and driving more traffic to the website.

Add Schema Markup to a website with Google Tag Manager

Adding schema markup to a website with Google Tag Manager (GTM) is a great way to increase your website's visibility and improve your Search Engine Optimization (SEO). With GTM, you can easily and quickly add schema markup to your website, allowing it to be crawled and indexed by search engines. 

Google Tag Manager (GTM) is a free platform for website owners to improve their website tracking and optimization. It helps you manage and deploy tags, which are snippets of code that provide tracking and other analytics to your website. GTM also allows you to add schema markup to your website with ease. 

Steps to Add Schema Markup to Website with Google Tag Manager: 

1. Sign Up for Google Tag Manager and configure your account.

2. Create a new tag in GTM and select "Custom HTML" as the tag type. Give your tag a name.

schema for seo - create GTM tag
How to setup new GTM tag

3. Paste your schema code in the dialogue box. You must have a valid JSON-LD markup code before you paste it into GTM.  

Adding schema GTM tag  with custom HTML option
Paste JSON-LD Schema code in Custom HTML dialogue box

4. Choose the trigger for the tag. The trigger is the event that should prompt the tag to execute. For example, for schema markup, you may decide to trigger the tag when a user visits the specific page where you want the markup to appear. Thus select the trigger 'Page Views.' 

Schema GTM Implementation - Choose Trigger Type
Choose trigger 'Page Views'

5. Name & save your trigger and save your tag.

6. Let us check implementation by clicking on 'Preview".

7. Check if your tag is working correctly on the specified page. Take a deep dive into the 'Tags' tab of the debugger dialogue box. Find if the schema code was fired.  

8. Publish the changes & you are all set.

9. Test your schema with Google's Structured Data testing tool. 

Note: You can typically test a structured data implementation using the URL. Since GTM injects code, it is sometimes hard to catch the code. So it's best to try with the rendered HTML for the page.

  

Following these steps, you can add schema markup to your website with Google Tag Manager. Adding schema markup to a website with Google Tag Manager is an efficient way to increase your website's visibility and help it be crawled and indexed by search engines. With the easy-to-use interface of GTM, you can quickly and easily add schema markup to your website in just a few simple steps.

Where to Insert Schema Markup Code?

When it comes to the recommended format for implementing schema markup, the first step is knowing where to insert the code. Generally speaking, there are three main places you can add schema markup code to your website: the body tag, the head tag, or inline as microdata. All three options have their benefits and drawbacks, so it's essential to consider which best suits your website's needs. Let's take a closer look at these options.

Schema Markup on Body Tag

One option for adding schema markup code to your website is within the body tag of each web page. The body tag contains the main content that appears on a web page, so adding schema markup code here can help search engines better understand the context and intent of this content. 

You should place the Schema markup code near the beginning of the <body> tag before any other content is loaded. It will ensure that the code is visible to search engine crawlers firsthand.

However, schema markup in the body tag can make the code difficult to maintain if you need to make changes or updates to the code. Additionally, adding the code to the body tag is incompatible with some content management systems (CMS).

Head Tag Schema

The head tag is another option for adding schema markup to your website. A web page's head tag usually contains all the meta information, such as the title, description, and other details.

Adding schema markup code here can make the code easier to maintain and update since it will all be in one place. Additionally, the head tag is more compatible with various content management systems, so you don't have to worry about compatibility issues.

The main drawback of adding schema code in the head tag is that you may need help adding snippet previews (such as rich snippets). The code needs to be rendered on the page for the snippet preview to work, which is impossible in the head tag. 

Inline Schema.org Microdata

The third option for adding schema markup code to your website is inline as microdata. The code is embedded directly into the web page's content rather than placing it in a tag. 

While this option can make it easier to maintain the code, it can also add clutter to the page, which could impact the user experience. Another drawback is that it can be difficult to scale when you need to make changes or updates to multiple web pages at once. 

Additionally, while this method is compatible with various content management systems, you may still need help adding snippets, such as rich snippets, if you use the inline schema.org microdata method. 

Writing and Validating Schema Markup

Writing and validating Schema Markup Code is a great way to help you ensure your website is providing accurate and helpful information to search engine crawlers. Here are the steps correctly create and validate your schema: 

1. Understand the goal - Before writing your schema markup code, take a moment to consider the purpose. By understanding the intent of the code, it will be much easier to create a valid code. 

2. Choose the correct type of schema - Different types of schema should be used depending on the information you would like to provide to crawlers. Do some research to discover the most appropriate kind of schema. You can select from the schema.org library

3. Include the required information - Once you have chosen the type of schema, identify the information that is necessary for it to describe your content accurately. Also, include any optional elements to provide extra detail for crawlers. 

4. Format the code correctly - For the code to be valid, it must be correctly formatted. Consider the structure of the code and the elements used so that search engine crawlers will correctly interpret it. JSON-LD markup code is the most used format but get in touch with your web developer to ensure what s the best option for your website. 

5. Test the code - Ensure your schema markup code is working correctly; test the code by submitting it to a validator such as Google's Structured Data Testing Tool

Schema Code Validation
Test & Validate Schema with Google's free tool

6. Track your progress - Once you have successfully validated your schema markup code, track your progress by monitoring it to see how effective it is. 

These steps will ensure that your website provides accurate and helpful information to search engine crawlers.

Schema Markup Code Implementation Checklist

Schema markup code is a robust tool businesses, content creators, and web admins can use to make their web pages more visible in search engine results pages (SERPs)

By correctly implementing Schema markup code, websites can gain a significant advantage in search engine rankings and boost their overall visibility. 

Now that we know where to insert the code, it's time to review an essential checklist for implementing schema markup code on a website.

Optimize your Page Titles

The website's page titles are essential for implementing schema markup code. It is vital to ensure that the titles accurately describe the page's content. Optimizing page titles will ensure that search engines correctly index the page.

Steps to Optimizing Page titles for Schema Code:

1. Target Specific Keywords: Start targeting specific keywords relevant to the page content. It will help search engines quickly identify a page's content.

2. Use Character Length Wisely: Ensure that the page titles are short enough. The ideal length for page titles is between 60-70 characters.

3. Include Primary and Secondary Keywords: Ensure to include both primary and secondary keywords in the page titles. It will help search engines more accurately understand the page's search intent.

4. Include Brand Name: Include your brand name in the title tags to make it easier for users to distinguish your website from others.

5. Make It Unique: Ensure that the page titles are unique and don't match other titles on the website. It will help search engines determine a keyword's most relevant pages.

Type of Data & Properties

 You can include various types and properties in a Schema markup code, so it is vital to have ones relevant to your content.

Some critical types of data and properties you should include are 

1. Organization data type includes your organization's name, address, phone number, and website.

2. Person type of data must include the person's name, job title, and contact information.

3. Product data type is critical for eCommerce websites and should include the product's name, price, description, images, and reviews.

4. Article type of data can be used for blog pages and should include the article's title, author, publication date, and body.

See the complete list of schema markup codes here.

Add Itemtypes & Itemprop Attributes 

The final step in implementing schema markup code is to add itemtypes and itemprop attributes. These attributes allow you to specify what type of data the webpage is providing. Search engines need to index the content accurately. 

Itemtype is an attribute used in schema markup code. This attribute specifies the type of data the webpage provides, such as:

1. Local Business

2. Organization

3. Person

4. Product

5. Event

6. Article, and more.

Item type can help search engine crawlers better understand the page's content, allowing them to index it more accurately.

Itemprop is an attribute used in schema markup code. This attribute specifies properties of the webpage, such as name, description, ratings, or images. Itemprop (or properties) help search engine crawlers better understand the page's content, allowing them to index it more accurately.

Remember to Add Schema Correctly

Schema markup code is a powerful tool that can boost a website's visibility in the SERPs. The code should be placed and optimized to ensure that it is indexed correctly by search engines. Additionally, it is essential to include the proper type of data and properties in the code. 

Currently you can add and validate schema on a per-page level. Using SEO platforms like Quattr, you can identify any schema implementation site-wide. You can also check how your structured data entries perform against top competing pages. Learn more on how Quattr can help scale your schema optimization efforts.

By following this guide and the accompanying checklist, you should be able to implement schema markup code on your website successfully. Doing so will help increase your website's visibility in the SERPs and make it easier to find by potential visitors.

Implement & Track Schema Code with the Quattr Platform

Get Started

Implementing Schema Markup FAQs

Where to put Schema Markup Code on a web page?

Web pages usually include schema markup in the header section. It should appear within microdata tags for valid HTML5 markup. It allows search engines to quickly identify schemas on web pages and associate them with the web page. SEO requires the correct HTML markup.

Can you put Schema Code in <body> tag?

Yes, you can put schema code in the <body> tag. However, putting it within the <head> tag is advisable. Placing the code in the <head> tag ensures that search engines can quickly identify the schema code associated with a web page and associate it with the web page. Additionally, it ensures that the code is applied consistently across multiple web pages.

How to know if my Schema Markup is working?

To ensure that your schema markup code is working correctly, you should use Google's Structured Data Testing Tool. This tool allows you to check the validity of your schema code and ensure correct implementation. Alternatively, you can use Google Search Console to see if the markup is associated with your web page. It can help identify errors in the markup and provide insight into how the search engine interprets the code.

About The Author

James Gibbons

James Gibbons is the Senior Customer Success Manager at Quattr. He has 10 years of experience in SEO and has worked with multiple agencies, brands, and B2B companies. He has helped clients scale organic and paid search presence to find hidden growth opportunities. James writes about all aspects of SEO: on-page, off-page, and technical SEO.

About Quattr

Quattr is an innovative and fast-growing venture-backed company based in Palo Alto, California USA. We are a Delaware corporation that has raised over $7M in venture capital. Quattr's AI-first platform evaluates like search engines to find opportunities across content, experience, and discoverability. A team of growth concierge analyze your data and recommends the top improvements to make for faster organic traffic growth. Growth-driven brands trust Quattr and are seeing sustained traffic growth.

Try Content AI Free Tools for SEO and Marketing

No items found.

Ready to see how Quattr
can help your brand?

Try our growth engine for free with a test drive.

Our AI SEO platform will analyze your website and provide you with insights on the top opportunities for your site across content, experience, and discoverability metrics that are actionable and personalized to your brand.