Yoast SEO for Shopify: Schema

Yoast SEO for Shopify: Schema

Yoast SEO for Shopify automatically generates structured data using the Schema.org standard. The data is created using information available in Shopify along with additional details entered through the app interface.

Other applications that provide structured data features, such as review or recipe apps, can integrate their data with the schema markup generated by the app. Further details about the approach, technical setup, and specifications are available in the official documentation.

Modifying the schema graph

Every element within the schema graph includes an @id attribute. This identifier allows properties to reference an existing item or expand an existing element with more information.

A webpage can contain multiple <script> tags with structured data. When combined, all the pieces from those scripts should form one unified and connected schema graph. After making any adjustments, it’s important to validate the changes using appropriate structured data testing tools.

Additional details about how specific @id values are generated are available in the documentation.

Adding new schema pieces

Typically, the schema graph contains an Organization entity, which is referenced as the publisher of a WebSite. The current WebPage is then connected as part of that website.

If you want to include extra structured data that refers to an existing entity, you can do this by using the @id property. For instance, an AggregateRating can be added where the reviewed item is the Organization.

Example:

{

 “@context”: “https://schema.org”,

 “@graph”: [

   {

     “@type”: “AggregateRating”,

     “@id”: “https://www.example.com/#/schema/AggregateRating/1”,

     “ratingValue”: “4”,

     “ratingCount”: “250”,

     “itemReviewed”: {

       “@id”: “https://www.example.com/#/schema/Organization/1”

     }

   }

 ]

}

Editing existing schema pieces

Existing elements in the schema graph can also be expanded by adding additional information to them.

For example, a WebPage can be extended with the FAQPage type and include Question entries. This works by referencing the @id of the original WebPage, allowing the data to merge into a single combined WebPage/FAQPage entity.

Example:

{

 “@context”: “https://schema.org”,

 “@type”: “FAQPage”,

 “@id”: “https://www.example.com/pages/frequently-asked-questions”,

 “mainEntity”: [

   {

     “@type”: “Question”,

     “name”: “Is there a local shop we can visit?”,

     “acceptedAnswer”: {

       “@type”: “Answer”,

       “text”: “No. The shop is only online.”

     }

   }

 ]

}

Availability of schema pieces

Not every schema component is suitable for all pages of an online store. The system follows specific logic to determine when certain pieces are included. When modifying the schema graph, the same logic should be considered.

Checking whether schema pieces are enabled

Within the Yoast SEO for Shopify app, several schema components can be turned off. If disabled, those elements will not appear in the output.

This configuration is stored in the yoast_seo.settings metafield on the shop object. It is a JSON metafield that keeps the enabled or disabled status inside schema.outputControls.

Schema pieceMetafield
Entire graphshop.metafields.yoast_seo.value.schema.outputControls.schema
Organizationshop.metafields.yoast_seo.value.schema.outputControls.organization
WebSiteshop.metafields.yoast_seo.value.schema.outputControls.website
WebPageshop.metafields.yoast_seo.value.schema.outputControls.webpage
Articleshop.metafields.yoast_seo.value.schema.outputControls.article
Productshop.metafields.yoast_seo.value.schema.outputControls.product
BreadcrumbListshop.metafields.yoast_seo.value.schema.outputControls.breadcrumb

Verifying the Organization name

The Organization entity will only be generated if the organization name has been defined in the settings of the Yoast SEO for Shopify app.

This information is also stored in the yoast_seo.settings metafield within the shop object. The organization name must not be empty and is saved in:

shop.metafields.yoast_seo.value.schema.siteRepresentation.organizationName

Conditions for generating an Article

Although a WebPage entity is usually created automatically, the Article entity depends on the presence of the Organization. Therefore, the organization name must be defined.

An Article also requires a value for the description property. By default, the system uses the page’s meta description. If no meta description exists, the article schema will not be generated.

Additionally, the article must include an image. This image can come from several sources:

  • page_image
  • The default site image stored in
    shop.metafields.yoast_seo.value.siteSettings.siteDefaults.siteImage.url
  • The article.image object
  • The OpenGraph image stored in
    article.metafields.yoast_seo.indexable.value.open_graph_image_url

Creating ID parameters

Each schema element generated by Yoast SEO for Shopify can be referenced using an @id attribute. The following logic is used to build these IDs:

  • Organization: shop.url | append: ‘/#/schema/organization/1’
  • WebSite: shop.url | append: ‘/#/schema/website/1’
  • WebPage: canonical_url
  • Article: canonical_url | append: ‘#/schema/article/’ | append: article.id
  • Person: article.author | handleize | prepend: ‘/#/schema/person/’ | prepend: shop.url
  • Product: canonical_url | append: “/#/schema/Product”
  • Offer: shop.url | append: ‘/#/schema/Offer/’ | append: variant.id
  • BreadcrumbList: canonical_url | append: ‘/#/schema/breadcrumb’
  • ImageObject: shop.url | append: ‘/#/schema/ImageObject/’ | append: image.id

FAQs

What is schema markup in Shopify?
Schema markup is structured data added to your website’s code that helps search engines understand the content on your pages. On Shopify stores, schema can provide details about products, prices, reviews, availability, and other important information so that search engines can display richer results.

How does Yoast SEO help with schema on Shopify?
Yoast SEO automatically generates structured data for important pages such as product pages, collection pages, and blog posts. It organizes the data using a structured schema graph so search engines can clearly understand how different parts of your site are connected.

Why is schema markup important for an eCommerce store?
Schema markup helps search engines display enhanced search results like product ratings, pricing, and stock availability. These rich results can make your listings more attractive in search results and potentially increase click-through rates.

Does Shopify add schema markup by default?
Shopify themes often include basic schema markup, especially for products. However, the structure may be limited or inconsistent depending on the theme. Tools like Yoast SEO can improve and organize schema data more effectively.

What types of schema does Yoast SEO create for Shopify stores?
Yoast SEO can generate schema for products, articles, organization details, breadcrumbs, and website structure. This helps search engines better understand both your store content and how your pages relate to one another.

Do I need technical knowledge to use schema with Yoast SEO on Shopify?
No, Yoast SEO is designed to handle most schema generation automatically. Store owners usually only need to configure basic information such as brand details, product information, and site identity.

Can schema markup improve search rankings?
Schema markup does not directly increase rankings, but it helps search engines understand your content better. It can also lead to enhanced search results, which may improve visibility and click-through rates.

How can I check if schema markup is working correctly?
You can test your structured data using tools like Google’s Rich Results Test or Schema Markup Validator. These tools help identify errors or missing data that might prevent rich results from appearing.

What are rich results in search engines?
Rich results are enhanced search listings that display additional information such as product ratings, prices, images, FAQs, or breadcrumbs. Schema markup is what allows search engines to generate these enhanced results.

Does schema markup affect product visibility in search results?
Yes, structured data helps search engines better understand product information such as price, availability, and reviews. This can improve how products appear in search results and may attract more potential customers.

Leave a Reply