Structured Data

Hi all, does anybody know much about Structured Data and where it should be added. If I put it in either the head section or the bottom of the body, it shows either directly above or below the site. I understood Structured Data was for the benefit of Google and not the general public. Is there a way of hiding it so only Google sees it without being penalized for hidden text. Maybe I have the whole thing sim-construed.
The data I have constructed and inserted works perfectly in the Google Structured Data testing tool.

Try the following script in your header:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "NewsArticle",
  "mainEntityOfPage":{
    "@type":"WebPage",
    "@id":"HTML://EXAMPLE.COM/PAGE-LINK.HTML"
  },
  "headline": "HEADLINE DESCRIPTION GOES HERE",
  "image": {
    "@type": "ImageObject",
    "url": "HTML://EXAMPLES.COM/IMAGES/jb-photo-696x696.jpg",
    "height": 696,
    "width": 696
  },
  "datePublished": "2018-05-23T12:50:37+07:00",
  "dateModified":  "2018-05-23T12:50:37+07:00",
  "author": {
    "@type": "Person",
    "name": "YOURS TRULY GOES HERE"
  },
   "publisher": {
    "@type": "Organization",
    "name": "SITE NAME GOES HERE",
    "logo": {
      "@type": "ImageObject",
      "url": "HTML:EXAMPLES.COM/images/logo-180x60.png",
      "width": 180,
      "height": 60
    }
  },
  "description": " DESCRIPTION GOES HERE;"
}
</script>

ABOVE IS FOR AN AMPROJECT PAGE, YOUR PAGE SHOULD BE SIMILIAR

Only showing it to google is called cloaking and is really not recommended as that can be hurtful for your rankings. Just always have it in there. 99% of visitors aren’t looking at your source code anyway :slight_smile:

It usually appears in the page as mark-up of some kind, so visitors are not aware of it, but crawlers do see it.
What method are you using to add structured data?
I prefer the JSON-LD method, as mark-up within the page elements can get messy and may not have the structure you want.
I think you can put the json data anywhere on the page.

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