Orange Collar Media
Orange Collar Media
DOCS
OCMLABS/MODULE-SEO · STRUCTURED DATA & SOCIAL

Magento rich snippets with Product, BreadcrumbList, and Organization JSON-LD, plus Open Graph and Twitter cards

  • Magento
  • Adobe Commerce
  • Hyvä

SEO Suite outputs one JSON-LD block per page, built from the data already on the page, and adds Open Graph and Twitter card tags for sharing. Both are switched and mapped in Stores > Configuration > OCM Labs > SEO > Structured Data.

How-to: product schema and breadcrumbs, 0:58

What each page gets

PageJSON-LD
ProductProduct with name, SKU, description, image, brand, GTIN, MPN, and an Offer with price, currency, availability, and URL. aggregateRating and up to five reviews are added when Magento reviews are enabled and the product has approved reviews.
Product and categoryBreadcrumbList
Home pageOrganization, and WebSite with a SearchAction for your catalog search

A product with no valid price, rating, or review gets no Product node, because Google rejects an empty one.

All values are JSON-encoded, with </script> and similar sequences neutralized, so text in a product description cannot break out of the script block.

Mapping brand, GTIN, and MPN

Magento has no standard GTIN or MPN attribute, so tell the module which of your attributes hold them:

FieldDefaultNotes
Brand Attribute CodemanufacturerThe product attribute used for the schema brand.
GTIN Attribute Code(empty)The attribute holding the GTIN, EAN, or UPC. Empty omits gtin.
MPN Attribute Code(empty)The attribute holding the manufacturer part number. Empty omits mpn.

Enter attribute codes, not labels. Google uses these identifiers to match your product to the same product elsewhere, so fill them in where you have them.

Organization and WebSite

  • Organization Name defaults to the store name.
  • Organization Logo is a path inside pub/media, for example logo/default/logo.png. Other values are ignored.
  • Organization Profile URLs become the sameAs list: social and directory profiles, one per line, absolute http or https URLs only.

What the module does not output

  • No FAQPage markup. OCMLabs FAQ outputs it, and this module deliberately does not duplicate it.
  • Theme microdata is left in place. Luma’s and Hyva’s own Product microdata in their product templates stays alongside this module’s JSON-LD. Google accepts both.
  • No duplicate breadcrumbs on Hyva. Hyva renders its own BreadcrumbList JSON-LD; the ocmlabs/module-seo-hyva companion switches it off while this module’s structured data is on, and hands it back when you turn Enable JSON-LD off.

If another module in your store already outputs Product or Organization JSON-LD, turn off Enable JSON-LD here, or retire the other module, before running both.

Open Graph and Twitter cards

Product, category, and CMS pages get Open Graph and Twitter card tags, controlled per page from the SEO panel’s Social Title, Social Description, and Social Image fields.

How-to: Open Graph tags for shared pages, 0:52
TagValue
TitleThe Social Title override, else the meta title (or the meta title template), else the page heading
DescriptionThe Social Description override, else the meta description (or the description template), else the page’s own description
ImageThe Social Image override (a path inside the media folder), else, on product pages only, the product’s base image. Categories and CMS pages have no og:image unless an override is set.
og:typeproduct on product pages, website on categories and CMS pages
og:urlThe page’s canonical URL
twitter:cardsummary_large_image when an image is available, otherwise summary

Twitter title and description match the Open Graph ones. On product pages, the module replaces Magento’s own Open Graph block with one that adds only the price tags, so Open Graph tags are not repeated.

The social preview in the admin shows the Social Image once you set one. It does not show the base-image fallback, so a product with no Social Image shows “No social image set” in the preview even though its storefront page shares the base image.

Caching

Structured data and social tags are part of the page HTML that Magento’s full page cache already stores, so they add no database work to cached page views. Saving a page’s social overrides cleans that page’s cache tag; changes to the Structured Data settings need a full page cache flush.