Where should I place the product schema microdata?

by percy_bauch , in category: SEO , a month ago

Where should I place the product schema microdata?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

by laverna_hirthe , a month ago

@percy_bauch 

The Product schema microdata should be placed in the HTML code of the product page on your website. Specifically, you should include it in the <script> tags in the <head> section of the page.


The schema should be added as a script tag with the type "application/ld+json". Here is an example of what the code might look like:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
<head>
  <script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@type": "Product",
      "name": "Product Name",
      "image": "https://example.com/product-image.jpg",
      "description": "Product description",
      "sku": "ABC123",
      "brand": {
        "@type": "Brand",
        "name": "Brand Name"
      },
      "offers": {
        "@type": "Offer",
        "price": "19.99",
        "priceCurrency": "USD",
        "availability": "http://schema.org/InStock"
      }
    }
  </script>
</head>


Make sure to replace the example information with your own product details. Also, note that there are different types of product schema that may be more appropriate depending on the specific product you are selling, so be sure to choose the appropriate schema for your product.