Structured data not detected

I try to implement structured data but without success. How to detect this file or this is automatic detected inside Google?
As I understand Google prefers using the JSON-LD version of Schema markup for business listings. Should be any additional code inside body?

"@context": "",
"@type": "Organization",
"name" : "XXX",
"url": "",
"@context": "",
"@type": "LocalBusiness",
"name" : "XXX",
"url": "https://www.myexample/",

I don’t have an answer to your question, but I did just notice that there are stray commas after each “url” that probably shouldn’t be there, and it is all closed with a ] when it should be a }.


^ _ ^

Is the code in a file of its own?

Normally you would include this within <script> tags on your HTML page.

You can test it to see how Google sees your data here:-

File is as a stand-alone Javascript JSON file. should be anything inside body like LocalBusiness schema attribute?

It can be placed anywhere in the html body, but typically at the very end. Eg:-

<!DOCTYPE html>
      <title>My Page</title>
         <h1>My Page</h1>
         <p>Content here.</p>
         <p>Footer text.<p>
         **JSON Data Here**

Strange it is not detected.

Well Google do say that it is currently just a pilot scheme with a small number of initial providers. They hope to open it up to more later.

What test page are you using?

Should mention that because it’s JSON, not regular Javascript, it will need the type attribute:-

<script type="application/ld+json">
1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.