react-schemaorg icon indicating copy to clipboard operation
react-schemaorg copied to clipboard

Schema not showing up in Structured Data Tool

Open axelferb opened this issue 6 years ago • 3 comments

Would there be a reason why, when putting my webpage in the STD (https://search.google.com/structured-data/testing-tool/u/0/) that it would not detect schema on the site when using this method in react? What it actually prints on the page looks fine (see below).

Would this still be fine for SEO even though it does not find it in the structured data tool?

<script type="application/ld+json">
{"@context":"https://schema.org","@type":"FinancialService","legalName":"Sambla AS","name":"Sambla","logo":"https://s3-eu-west-1.amazonaws.com/tpd/logos/55152ede0000ff00057e5303/0x0.png","image":"https://s3-eu-west-1.amazonaws.com/tpd/logos/55152ede0000ff00057e5303/0x0.png","telephone":"33222970","url":"https://www.sambla.no","email":"[email protected]","address":{"@type":"PostalAddress","streetAddress":"Arbins gate 2","addressLocality":"Oslo","postalCode":"0253"},"openingHours":["Mo,Tu,Th 09:00-20:30","We 13:00-20:30","Fr 09:00-17:00"],"priceRange":"10000 - 500000"}
</script>

axelferb avatar Nov 28 '19 09:11 axelferb

According to https://developers.google.com/search/docs/guides/intro-structured-data#structured-data-format it should be fine:

Also, Google can read JSON-LD data when it is dynamically injected into the page's contents, such as by JavaScript code or embedded widgets in your content management system.

Note that you can get the Structured Data Testing Tool to work just fine if your setup implements server-side rendering for react.

Eyas avatar Dec 02 '19 15:12 Eyas

If we don't use server side render... will it still work?

pavanshinde47 avatar Mar 11 '20 10:03 pavanshinde47

Hi @pavanshinde47 see my above comment, this is specifically referring to the case where SSR is not enabled.

Eyas avatar Mar 23 '20 13:03 Eyas