Collection Page Shopify SEO Schema Implementation
Your collection page should contain two types of data:
- Website Collection Page
- Breadcrumbs list
Collection Page: Website
E-Commerce sites rarely mark up category pages with structured data.
To implement seo schema for collection pages in shopify, you can follow these steps:
- Access your shopify admin panel
- Look for the “collection.liquid” or “collection-template.liquid” file(it depends on your theme) and click to open it.
- Within the “collection.liquid” or collection-template.liquid file(it depends on your theme) file, find the area where you want to add the schema markup. Typically this is just above the closing tag.
This code will generate a JSON-LD script that includes the necessary structured data (schema) for search engines to understand the collection page’s information.
Example:
<
script type=
"application/
ld+json"
>
{
"@context":
"http:
\/\/schema.
org",
"@type":
"WebPage",
"url":
{{ shop.name | json }},
"mainEntity":
{"@type":
"offerCatalog",
"name":
{{ collection.title }},
"url":
{{ {{ collection.title | link_to: collection.url }} }},
"numberOfItems":
{{ collection.products.size
}}}
}
<
/script
>
Test the validity of your schema markup using the Google Structured Data Testing Tool or other similar tools to ensure there are no errors and no warnings.
Collection Page: BreadcrumbsList
Using structured data for breadcrumb lists, you can highlight your breadcrumb’s internal links on Google.
This code will generate a JSON-LD script that includes the necessary structured data (schema) for search engines to understand the collection page’s information.
Example:
<
script type=
"application/ld+json"
>
{
"@context":
"https:
//schema.org",
"@type":
"BreadcrumbList",
"itemListElement":
[{
"@type":
"ListItem",
"position":
1,
"name":
"Home",
"item":
{{ shop.url | json }}
},{
"@type":
"ListItem",
"position":
2,
{% if template contains 'page' %}
"name":
{{ page.title | json }},
"item":
{{ shop.url | append: page.url | json }}
{% else %}
"name":
{{ collection.title | json }},
"item":
{{ shop.url | append: collection.url | json }}
{% endif %}
}]
}
<
/script
>
The Google Structured Data Testing Tool or other similar tools can be used to ensure your schema markup is valid.
Test the validity of your schema markup using the Google Structured Data Testing Tool or other similar tools to ensure there are no errors and no warnings.