Product Page Shopify SEO Schema Implementation
Implementing SEO schema on a product page in shopify can help improve your website’s visibility in search engines and provide search engines with implementing structured data markup about your products. can further enhance your Shopify store’s SEO performance.
Product structured data
It is generally considered the highest priority structured data type on shopify sites. This is because it marks up a lot of product data for search engines.
Here is the guide to implementing seo schema on your shopify product pages:
Product information data such as:
- Product name
- URL
- Image
- Description
- Price
- Availability
- SKU
- Review Ratings
To add schema makeup, you can use JSON-LD format Here is an example of how to add basic schema markup for a product.
- Access your shopify admin panel
- In the code editor, locate the “sections” folder and click to open it.
- In the themes section click on the “Actions” button for your active theme and choose “Edit code”.
- In the code editor, locate the “sections folder and click to open it.
- Look for the “product-template.liquid” or “main-product.liquid” file(web page name varies according to theme) and click to open it.
- Within the “product-template.liquid” or “main-product.liquid” file(web page name varies according to theme), find the area where you want to add the schema markup. Typically this is just above the closing tag.
- Add the schema markup using the JSON-LD format. Here is an example of a basic schema markup for a product page:
Example:
<
script type=
"application/ld+json"
>
{
"@context":
"https:
//schema.
org/",
"@type":
"Product",
"name":
"{{ product.title | escape }}",
"image":
"{{ product.featured_image.src | img_url: '1024x1024' }}",
"description":
"{{ product.description | strip_html | escape }}",
"sku":
"{{ product.sku }}",
"brand":
{
"@type":
"Brand",
"name":
"{{ product.vendor | escape }}"
},
"offers":
{
"@type":
"Offer",
"priceCurrency":
"{{ shop.currency }}",
"price":
"{{ product.price | divided_by: 100.0 }}",
"availability":
"https://
schema.org/
{{ product.available ? 'InStock' : 'OutOfStock' }}"
}
}
<
/script
>
-
- 8. Customize the schema markup with relevant fields from your shopify product data. You can reference the liquid variables to dynamically populate the data within the markup.
- 9. Save the changes to the “product-template.liquid” file.
To verify that the schema markup is implemented correctly, you can use Google structured data testing tools like schema validator or any other similar tool to check errors and ensure the markup is valid.
It is essential to include the aggregate rating property in the structured data of products. As a result of this property, you will be able to see how many reviews there are on the page (review count) and what the average rating of the product is (rating value).
Search engines will also often display data other than the product directly in the SERPS, such as pricing information and reviews, as a result.
Product Page: Breadcrumbs
Breadcrumbs structured data as a schema type that highlights your Breadcrumb internal links to search engines.
To implement product page breadcrumbs and shopify seo schema, you can follow these steps:
- Access your shopify admin panel
- In the code editor, locate the “sections” folder and click to open it
- Look for the “product-template.liquid” or “main-product.liquid” file (web page name varies according to theme), and click to open it.
- Within the “product-template.liquid” or “main-product.liquid” file(web page name varies according to theme), find the area where you want to add the schema markup. Typically this is just above the closing tag.
Example:
{% if template contains 'product' %}
<
script type=
"application/ld+json"
>
{
"@context":
"https:
//schema.org",
"@type":
"BreadcrumbList",
"itemListElement":
[
{
"@type":
"ListItem",
"position":
1,
"name":
"Home",
"item":
"{{ shop.url }}"
},
{
"@type":
"ListItem",
"position":
2,
"name":
"{{ collection.title }}",
"item":
"{{ collection.url }}"
},
{
"@type":
"ListItem",
"position":
3,
"name":
"{{ product.title }}",
"item":
"{{ product.url }}"
}
]
}
<
/script
>
{% endif %}
This code generates a JSON-LD script that adds structured data to your product pages. It includes information such as the product name, image, description SKU, brand, price, Availability and aggregate rating.
We can see from their schema that structured data is marked up with breadcrumb lists:
Sometimes implementing breadcrumb list structured data might help google better understand the site and how the categories and subcategories are interrelated.