<p>To customize what metadata gets output for a given Product Type you will need to create a an Element Metadata field and add it to the Product Type Field Layout.</p>
<p>When you configure the Element 'Metadata' field you can setup default values and for the 'Main Entity' value you can select 'Product'.</p>
<p>By default, Sprout SEO's JSON-LD Schema for products only knows about the default fields that Craft Commerce provides. If you need to customize the schema further to your specific use case you can write a <a href="https://sprout.barrelstrengthdesign.com/docs/seo/custom-schema.html#custom-schema" rel="nofollow noreferrer">Custom Schema</a> integration and it will also appear as an option in that Main Entity dropdown for you to select when configuring the Metadata field.</p>

CC BY-SA 4.0
2022-03-03T09:56:59.013Z
Thank you very much! I thought it was enough to create one element metadata field for all sections. I simply did not see the Main Entity field. Works perfectly.
rjanits
CC BY-SA 4.0
2022-03-03T02:31:25.187Z
2022-03-03T02:31:25.187Z
Ben Parizek
<p>My product detail pages output the globally defined Schema <code>@type: 'Website'</code> in the JSON-LD.</p>
<p>I know there is a class <code>ProductSchema.php</code> in <code>sprout-seo/src/schema</code> but i don't know how to assign it.</p>
<p>How do I assign the ProductSchema to my products?
I would appreciate any help.</p>

<plugin-sproutseo>
Sprout SEO JSON-LD adding ProductSchema
# Sprout SEO JSON-LD adding ProductSchema

(Asked by: username_0 on 2022-03-02)

My product detail pages output the globally defined Schema `@type: 'Website'` in the JSON-LD.

I know there is a class `ProductSchema.php` in `sprout-seo/src/schema` but i don't know how to assign it.

How do I assign the ProductSchema to my products?
I would appreciate any help.

**Tags:** plugin-sproutseo


---

## 1 answers

### Answer by username_1 on 2022-03-03. Score: 0 | Accepted answer

To customize what metadata gets output for a given Product Type you will need to create a an Element Metadata field and add it to the Product Type Field Layout.

When you configure the Element 'Metadata' field you can setup default values and for the 'Main Entity' value you can select 'Product'.

By default, Sprout SEO's JSON-LD Schema for products only knows about the default fields that Craft Commerce provides. If you need to customize the schema further to your specific use case you can write a [Custom Schema](https://sprout.barrelstrengthdesign.com/docs/seo/custom-schema.html#custom-schema) integration and it will also appear as an option in that Main Entity dropdown for you to select when configuring the Metadata field.

> **Comments:**
> **username_0**: Thank you very much! I thought it was enough to create one element metadata field for all sections. I simply did not see the Main Entity field. Works perfectly.  

---

