Adding Structured Data To BigCommerce for Google Merchant Center

Adding Structured Data To BigCommerce for Google Merchant Center (JSON-LD & Microdata)

Edit Theme File

Important :
It is recommend you remove all your old structured data coding.

Edit Theme by going to Storefront > My Themes > Inside the current theme, click on Advanced > Edit Theme Files

BigCommerce Edit Theme Files

Navigate to : templates/components/products/product-view.html

Paste the below JSON-LD or Microdata at the top of the page and save.

<!-- Copyright FeedArmy 2023 Version 1.20 -->
<script type="application/ld+json">
{
  "@context": "http://schema.org/",
  "@type": "Product",
  "@id": "{{ product.url }}",
  "name": "{{product.title}}",
  "sku": "{{ product.id }}",
  {{#if product.gtin }}"gtin": "{{ product.gtin }}", {{/if}}
  {{#if product.brand.name }}"brand": {
            "@type": "Brand", 
            "name": "{{product.brand.name}}", 
            },{{/if}}
  "description": "{{ sanitize product.description }}",
  "image": "{{getImage product.main_image "thumbnail"}}",
  "url": "{{product.url}}",
    "offers": {
		"@type": "Offer",
		"priceCurrency": "{{currency_selector.active_currency_code}}",
		"price": "{{ product.price.with_tax.value }}",
		"itemCondition" : "http://schema.org/NewCondition", 
		"availability" : "{{#if product.out_of_stock}}http://schema.org/OutOfStock{{else}}http://schema.org/InStock{{/if}}",
		"url" : "{{product.url}}"
	}
}
</script>

Testing

Verify that you have done it correctly by checking the page with Google’s Structured Data Testing Tool

As of writing, you will see 3 warnings, these are :

  • priceValidUntil
  • aggregateRating
  • review

Shopify has no default coding that can be used to fill these fields in. So simply ignore these.

Google Structured Data Testing Result

Need Help?
Do you have a question or need specialist support? Get in touch!

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x