Zum Hauptinhalt springen Skip to page footer

Strukturierte Daten

Das Inhaltselement Schema wird zur Einbindung von JSON-LD-Daten verwendet. Dabei können die Werte der einzelnen Eigenschaften mit TS-KonstantengetText-Datentypen oder über das processedData-Array definiert werden.

Dem Inhaltselement kann ein Bild und ein Text hinzugefügt werden. Mit den Platzhaltern {processedData:schemaImages.0} und {data:field:teaser} werden die Inhalte in die strukturierten Daten übernommen. Dies ist im Speziellen bei Webseiten mit verschiedenen Sprachen nützlich.

Mit der Anweisung {func:entityEncodeChars:Platzhalter} werden die Zeichen des Platzhaltertextes in ihre Entitäten konvertiert. Dies ist von Interesse, wenn der entsprechende Text vor Missbrauch geschützt werden soll (z.B. Email-Adressen).

Das Breadcrumb-Markup kann mit {processedData:breadcrumb} erstellt werden.

Die Daten werden mit einem script-Tag im HTML-Bodybereich ausgegeben und können nach Wunsch auf der Seite angezeigt werden.

In den meisten Fällen kommen Datenstrukturen, wie sie unter schema.org definiert sind, zum Einsatz.

Weitere Informationen zu diesem Inhaltselement sind im Manual verfügbar.

Strukturierte Daten testen

Strukturierte Daten können unter json-ld.org/playground/ oder search.google.com/test/rich-results getestet werden. Weitere Links: JSON-Editor.

Beispiel

JSON-LD Code im Inhaltselement

{
  "@context": "http://schema.org",
  "@graph": [
    {
      "@type" : "Organization",
      "name": "{$pizpalue.customer.company}",
      "email": "{func:entityEncodeChars:{$pizpalue.customer.contactEmail}}",
      "telephone": "{$pizpalue.customer.contactPhone}",
      "faxNumber": "{$pizpalue.customer.contactFax}",
      "url" : "https://www.{$pizpalue.customer.domain}",
      "logo": "{processedData:schemaImages.0}",
      "description": "{func:newLineToRn:{data:field:teaser}}",
      "address": {
        "@type": "PostalAddress",
        "addressLocality": "{$pizpalue.customer.contactCity}, Switzerland",
        "postalCode": "CH-{$pizpalue.customer.contactZip}",
        "streetAddress": "{$pizpalue.customer.contactAddress}"
      },
      "contactPoint" : [
        { "@type" : "ContactPoint",
          "telephone" : "{$pizpalue.customer.contactPhone}",
          "contactType" : "customer service"
        }
      ]
    },
    {
      "@type":"WebPage",
      "headline":"{parentData:field:title}",
      "description":"{func:newLineToRn:{parentData:field:description}}",
      "breadcrumb":{processedData:breadcrumb}
    }
  ]
}

JSON-LD Code im Script-Tag

{
    "@context": "http://schema.org",
    "@graph": [
        {
            "@type": "Organization",
            "name": "Company GmbH",
            "email": "info@domain.ch",
            "telephone": "+41 11 111 11 11",
            "faxNumber": "+41 11 111 11 21",
            "url": "https://www.pizpalue.buechler.pro",
            "logo": "https://pizpalue.buechler.pro//home/httpd/vhosts/metahost.synhost.com.es/httpdocs/pizpalue12/.build/public//fileadmin/_processed_/3/9/csm_geran-de-klerk-136351_1d07524ccb.jpg",
            "description": "Development of mobile phones powered by propietary OS to guarantuee privacy.\r\n\r\nAll phones are equipped with a premium camera to capture precious moments bay day and night.",
            "address": {
                "@type": "PostalAddress",
                "addressLocality": "City, Switzerland",
                "postalCode": "CH-1000",
                "streetAddress": "Street 1"
            },
            "contactPoint": [
                {
                    "@type": "ContactPoint",
                    "telephone": "+41 11 111 11 11",
                    "contactType": "customer service"
                }
            ]
        },
        {
            "@type": "WebPage",
            "headline": "Strukturierte Daten",
            "breadcrumb": true
        }
    ]
}