I initially wrote some code that created the structured data for breadcrumb and product markup on the server's side and rendered them in the
<body> of the page. While the mark up was correct according to Google's Structured Data Testing Tool, I saw no difference in the SERPs and when I opted to "fetch by URL" instead of "snippet" the tool was fetching only the
<head> of the given page's URL, so no structured data were being detected.
This was confusing, as in Google's documentation it is stated that the structured data can be inserted in the
head of an HTML page.
I switched my approach and decided to place the product structured data in the
<head> of the page.
When I tested my new links by "fetch URL" option, Google's tool was fetching the whole page (which it did not do before) but was not displaying the product structured data. This time however, it was fetching the breadcrumb data, which it did not do before and without changing anything in my code.
- Why was the tool initially fetching only the
<head>but not the
- Why is the tool later also fetching the
<head> runs on
document.ready. The breadcrumb mark up renders together with the HTML during runtime.