How to implement Local Business Schema in website header?

Hello

I’m trying to add Rich Schema to our site because I’ve read it helps with SEO, but I’m a little unsure to to implement it, and can’t find an exact explanation.

I’ve built the code and was wondering now where to add it to my site?

Thanks I appreciate the help


Hi @paint-cabin111 ,

Shopify has a sample code for Dawn theme, you can refer to the following code https://github.com/Shopify/dawn/blob/main/sections/header.liquid

Hope it is clear to you.

Hi

I hope you are doing well.

You can use schema markup to code specific website elements so that search engines will better understand them.

By including local schema markup on your website, you can explicitly inform search engines what your company name, logo, address, phone number, operating hours, and more are.

There are different formats of schema markup: RDFa, Microdata, and JSON-LD, sometimes known as ld+json.

JSON-LD is the Google recommended format for the schema. JSON-LD is a Javascript notation embedded in a tag in the page head. Its easier to understand because it expresses data without user-visible text in-between.

You can also check whether your schema code is fine or not with the help of https://validator.schema.org/

You have to paste the code into a code snippet and, after that, run the test.

If the code is fine it looks like this

Once the code is verified you can add it to the Shopify store

To add Schema in the Shopify store you can do this in two ways

First method:- The first option would be to manually add the schema tag. To do this you would first need to login to the backend of your Shopify store and go to online store>Themes>Action>Edit Code.

After that go to the theme. liquid and add it to the end of the head tag as you can see in the given below screenshot

After that save the file and the schema is added to your website.

And if you want to check whether your schema is set up properly or not you simply have to visit https://validator.schema.org/ and add your website URL and run a test

When the schema is properly set up it shows like this

Another method is to install a plugin to help implement Schema on your Shopify site

The second (and easier) option is to install a plugin, there are many apps that can add schema tags to your site. However, we recommend using Smart SEO or Schema Plus for SEO. Smart SEO will automatically provide Search engines, including Google with detailed structured data in JSON-LD format. For example, it generates structured data for every product on your collection pages.

I hope this will help you to solve your query

Thank you.

2 Likes

Hello @paint-cabin111 ,

You should add the schema code to your HTML document’s section. However, it can also be placed in the Section as long as it’s within a Tag and don’t interfere with other page content.

To know more about the structure, find here: Shopify Schema Markup