学校的模式数据

时间:2017-04-28 14:49:38

标签: schema.org json-ld structured-data

为细分学校实施的最佳架构

我对为School创建架构标记的最佳SEO实践感兴趣,该Preschool具有细分:ElementarySchoolMiddleSchoolHighSchoolcontactPoint。我的计划最初是为每个分区页面和主页创建JSON-LD。

我的问题是:

  1. 这是一个很好的方法,并且符合最佳架构实践吗?
  2. 使用架构时,将学校细分与学校联系起来的最佳方法是什么?
  3. 使用架构https://github.com/jantimon/html-webpack-plugin标记联系页面上的每个姓名和电话号码是否合适?
  4. 我有什么机会可以利用或者我应该避免的陷阱吗?
  5. 我已经包含了JSON-LD代码,因为我认为这些页面的代码可能看起来像。

    主页:

    <script type='application/ld+json'>
    {
      "@context": "http://schema.org/",
      "@type": "School",
      "address": {
        "@type": "PostalAddress",
        "addressCountry": "Country",
        "addressLocality": "City",
        "addressRegion": "State",
        "postalCode": "12345",
        "streetAddress": "123 School St",
        "telephone": "+15432190100",
        "description": "This is a very good school"
      },
      "areaServed": "City",
      "name": "School",
      "url": "https://www.school.edu",
      "sameAs": [
        "https://www.facebook.com/school",
        "https://www.youtube.com/user/school",
        "http://twitter.com/school",
        "https://www.instagram.com/school/"
      ]
    }
    </script>
    

    幼儿园页面

    注意:电话号码和姓名不同,但地址相同。这会在谷歌眼中出现重复或垃圾邮件吗?

    <!--Preschool-->
    <script type='application/ld+json'>
    {
      "@context": "http://schema.org/",
      "@type": "Preschool",
      "address": {
        "@type": "PostalAddress",
        "addressCountry": "Country",
        "addressLocality": "City",
        "addressRegion": "State",
        "postalCode": "12345",
        "streetAddress": "123 School St",
        "telephone": "+15432190101",
        "description": "School has a very good preschool"
      },
      "areaServed": "City",
      "name": "School - Preschool",
      "url": "https://www.school.edu/preschool",
      "parentOrganization": {
        "@type": "School",
        "name": "School"
      }
    }
    </script>
    

1 个答案:

答案 0 :(得分:3)

我试图为您提供各种可能性的最佳解决方案。

让我们先解决你的疑惑。

答案1:虽然需要修改结构,但您正朝着正确的方向前进,如下面的代码所示。

Ans2:为了实现Subdivision,最好的方法是使用提供SubOrganization的Educational Organization Schema

Ans3:您可以在下面给出的代码中检查您的案例中contactPoint的使用情况。

Ans4:如果你这样做的话,没有任何陷阱。

JSON-LD下面包含您可能需要的所有结构,如 School,PreSchool,MiddleSchool 等。

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "EducationalOrganization",
  "name" : "School",
  "address": {
    "@type": "PostalAddress",
    "addressCountry": "IN",
    "addressLocality": "City",
    "addressRegion": "State",
    "postalCode": "000000",
    "streetAddress": "#310 Example",
    "telephone": "+15432190100",
    "description": "This is a very good school"
  },
  "areaServed": "City",
  "@id" : "http://www.example.com/homepage-url",
  "url": "http://www.example.com/",
  "logo": "http://www.example.com/images/logo.png",
  "email" : "example@example.com",
  "sameAs": [
    "https://www.facebook.com/example",
    "http://twitter.com/example",
    "https://www.instagram.com/example"
  ],
  "subOrganization" : [
    {
        "@type": "Preschool",
        "name" : "Preschool 1",     
        "telephone" : "+1-877-672-7777",
        "@id" : "http://www.example.com/preschool-1",
        "url": "http://www.example.com/preschool-1",    
        "address":{
          "@type":"PostalAddress",
          "streetAddress":"#310 Example",
          "addressLocality":"City",
          "addressRegion":"State",
          "postalCode":"000000",
          "addressCountry":"IN"
        },
        "contactPoint" : [
            { "@type" : "ContactPoint",
              "telephone" : "+1-877-746-0909",
              "contactType" : "Customer Service",
              "contactOption" : "TollFree",
              "areaServed" : "IN"
            } , 
            { "@type" : "ContactPoint",
              "telephone" : "+1-877-746-0606",
              "contactType" : "Bill Payment",
              "contactOption" : "TollFree",
              "areaServed" : "IN"
            } 
        ]   
    },
    {
        "@type": "Preschool",
        "name" : "Preschool 2",
        "telephone" : "+1-877-672-8888",
        "@id" : "http://www.example.com/preschool-2",
        "url": "http://www.example.com/preschool-2",
        "address":{
          "@type":"PostalAddress",
          "streetAddress":"#310 Example",
          "addressLocality":"City",
          "addressRegion":"State",
          "postalCode":"000000",
          "addressCountry":"IN"
        },
        "contactPoint" : [
            { "@type" : "ContactPoint",
              "telephone" : "+1-877-746-3030",
              "contactType" : "Customer Service",
              "contactOption" : "TollFree",
              "areaServed" : "IN"
            } , 
            { "@type" : "ContactPoint",
              "telephone" : "+1-877-746-2020",
              "contactType" : "Bill Payment",
              "contactOption" : "TollFree",
              "areaServed" : "IN"
            } 
        ]
    },
    {
        "@type": "MiddleSchool",
        "name" : "MiddleSchool 1",  
        "telephone" : "+1-877-672-9999",    
        "@id" : "http://www.example.com/middleschool-1",
        "url": "http://www.example.com/middleschool-1",
        "address":{
          "@type":"PostalAddress",
          "streetAddress":"#310 Example",
          "addressLocality":"City",
          "addressRegion":"State",
          "postalCode":"000000",
          "addressCountry":"IN"
        }  
    },
        {
        "@type": "MiddleSchool",
        "name" : "MiddleSchool 2",  
        "telephone" : "+1-877-672-0000",
        "@id" : "http://www.example.com/middleschool-2",
        "url": "http://www.example.com/middleschool-2",
        "address":{
          "@type":"PostalAddress",
          "streetAddress":"#310 Example",
          "addressLocality":"City",
          "addressRegion":"State",
          "postalCode":"000000",
          "addressCountry":"IN"
        }  
    }
  ]
}
</script>

上述代码也经过Google结构化数据测试工具验证。 附上screenshot供您参考。

不要担心&#34;未分类的错误&#34;,它可能是Google架构工具中的错误。 有关该错误的更多信息here

希望它有效:)