个人资料页面 (ProfilePage) 结构化数据

图示:搜索结果中的一个“观点”过滤条件

ProfilePage 标记适用于创作者(个人或组织)分享第一手观点的任何网站。它有助于 Google 搜索突出显示创作者的相关信息,例如姓名或社交媒体标识名、个人资料照片、关注者人数或其内容的热门程度。Google 搜索还会在区分创作者时,以及在观点讨论与论坛等功能中使用此标记。

其他结构化数据功能也可以链接到带有 ProfilePage 标记的网页。例如文章食谱结构化数据具有作者,论坛问答页面结构化数据中经常会有多个作者。

如何添加结构化数据

结构化数据是一种提供网页相关信息并对网页内容进行分类的标准化格式。如果您不熟悉结构化数据,可以详细了解结构化数据的运作方式

下面概述了如何构建、测试和发布结构化数据。如需获得向网页添加结构化数据的分步指南,请查看结构化数据 Codelab

  1. 添加必要属性。根据您使用的格式,了解在网页上的什么位置插入结构化数据
  2. 遵循指南
  3. 使用富媒体搜索结果测试验证您的代码,并修复所有严重错误。此外,您还可以考虑修正该工具中可能会标记的任何非严重问题,因为这些这样有助于提升结构化数据的质量(不过,要使内容能够显示为富媒体搜索结果,并非必须这么做)。
  4. 部署一些包含您的结构化数据的网页,然后使用网址检查工具测试 Google 看到的网页样貌。请确保您的网页可供 Google 访问,不会因 robots.txt 文件、noindex 标记或登录要求而被屏蔽。如果网页看起来没有问题,您可以请求 Google 重新抓取您的网址
  5. 为了让 Google 随时了解日后发生的更改,我们建议您提交站点地图Search Console Sitemap API 可以帮助您自动执行此操作。

示例

下面是一个带有标记的个人资料页面的示例:

JSON-LD

<html>
  <head>
    <title>Angelo Huff on Cool Forum Platform</title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "ProfilePage",
      "dateCreated": "2024-12-23T12:34:00-05:00",
      "dateModified": "2024-12-26T14:53:00-05:00",
      "mainEntity": {
        "@type": "Person",
        "name": "Angelo Huff",
        "alternateName": "ahuff23",
        "identifier": "123475623",
        "interactionStatistic": [{
          "@type": "InteractionCounter",
          "interactionType": "https://schema.org/FollowAction",
          "userInteractionCount": 1
        },{
          "@type": "InteractionCounter",
          "interactionType": "https://schema.org/LikeAction",
          "userInteractionCount": 5
        }],
        "agentInteractionStatistic": {
          "@type": "InteractionCounter",
          "interactionType": "https://schema.org/WriteAction",
          "userInteractionCount": 2346
        },
        "description": "Defender of Truth",
        "image": "https://example.com/avatars/ahuff23.jpg",
        "sameAs": [
          "https://www.example.com/real-angelo",
          "https://example.com/profile/therealangelohuff"
        ]
      }
    }
    </script>
  </head>
  <body>
  </body>
</html>
微数据

<html>
  <head>
    <title>Angelo Huff on Cool Forum Platform</title>
  </head>
  <body itemtype="https://schema.org/ProfilePage" itemscope>
    <meta itemprop="dateCreated" content="2024-12-23T12:34:00-05:00" />
  	<meta itemprop="dateModified" content="2024-12-26T14:53:00-05:00" />
    <div itemprop="mainEntity" itemtype="https://schema.org/Person" itemscope>
      <div><span itemprop="alternateName" id="handle">ahuff23</span> (<span itemprop="name" id="real-name">Angelo Huff</span>)</div>
      <meta itemprop="identifier" content="123475623" />
      <div itemprop="description">Defender of Truth</div>
      <img itemprop="image" src="https://example.com/avatars/ahuff23.jpg" />
      <div>Links: <a itemprop="sameAs" href="https://www.therealangelohuff.com">Home Page</a><br />
                  <a itemprop="sameAs" href="https://example.com/profile/therealangelohuff">Other Social Media Site</a></div>
      <div><span itemprop="interactionStatistic" itemtype="https://schema.org/InteractionCounter" itemscope>
              <span itemprop="userInteractionCount">5</span>
              <span itemprop="interactionType" content="https://schema.org/LikeAction">likes</span>
           </span>,
           <span itemprop="interactionStatistic" itemtype="https://schema.org/InteractionCounter" itemscope>
              <span itemprop="userInteractionCount">1</span>
              <span itemprop="interactionType" content="https://schema.org/FollowAction">follower</span>
           </span>, and
           <span itemprop="agentInteractionStatistic" itemtype="https://schema.org/InteractionCounter" itemscope>
              <span itemprop="userInteractionCount">2346</span>
              <span itemprop="interactionType" content="https://schema.org/WriteAction">posts</span>
           </span>
       </div>
    </div>
  </body>
</html>

指南

若要使您的个人资料页面结构化数据能够在 Google 搜索中使用,您必须遵循以下指南:

内容指南

  • 页面的重点必须是与整个网站有关联的单个个人或组织。下面列举了个人资料页面的一些示例:

    有效用例

    • 论坛或社交媒体网站上的用户个人资料页面
    • 新闻网站上的作者页面
    • 博客网站上的“关于我”页面
    • 公司网站上的员工页面

    无效用例

    • 商店的首页(通常包含大量非商家资料信息)
    • 组织评价网站(组织与该网站无关联)

技术指南

如果个人资料页面还包含创作者的近期活动,您可以在这些对象上使用网址添加标记,以便引用包含完整内容和标记的页面。例如,下面是一种可能的标记结构:

{
  "@context": "https://schema.org",
  "@type": "ProfilePage",
  "mainEntity": {
    "@id": "#main-author",
    "@type": "Person",
    "name": "Marlo Smith"
  },
  "hasPart": [{
    "@type": "Article",
    "headline": "Things to see in NJ",
    "url": "https://example.com/things-to-see-nj",
    "datePublished": "2014-02-23T18:34:00Z",
    "author": { "@id": "#main-author" }
  }]
}

结构化数据类型定义

若要使您的结构化数据能够在搜索结果中显示,您必须为其添加必需属性。您还可添加建议属性,以便加入与个人资料页面相关的更多信息,进而提供更优质的用户体验。

ProfilePage

如需了解 ProfilePage 的完整定义,请访问 schema.org/ProfilePage

必需属性
mainEntity

PersonOrganization

此个人资料页面所涉及的个人或组织。这指明此页面的重点是有关此实体的信息。

如果可以获得相应信息(也就是说,如果您知道相应页面是代表个人还是组织),请尝试使用正确的类型;否则默认使用 Person(例如,若是账号类型未知)。

建议的属性
dateCreated

DateTime

个人资料的创建日期和时间(如果适用),采用 ISO 8601 日期格式。

dateModified

DateTime

个人资料中信息的修改日期和时间(如果适用),采用 ISO 8601 日期格式。理想情况下,这仅表示由人工修改的个人资料元数据更改;例如,向引用此个人资料的位置添加额外的出链不会构成修改。

PersonOrganization

schema.org/Personschema.org/Organization 都具有 Google 使用的常见属性。

必需属性
name

Text

个人或组织的主要识别方式。我们建议针对真实姓名使用此字段(对于社交媒体标识名,请使用 alternateName)。但是,如果社交媒体标识名是在您网站上识别某个人的唯一方式,您就可以使用此字段来指定社交媒体标识名。

建议的属性
agentInteractionStatistic

InteractionCounter

有关个人资料页面实体自身行为的用户统计数据(如果适用)。

Google 可识别以下 interactionTypes

alternateName

Text

备用的公开标识符(如果适用)。例如,如果在 name 字段中使用某人的真实姓名,此属性则为社交媒体标识名。

description

Text

用户的署名或适用凭证(如果适用)。

identifier

Text

您的网站中使用的任何唯一标识符(如果适用)。它可以是一个内部数据库 ID,您的网站使用该 ID 来识别用户(即使用户的社交媒体标识名发生了更改)。

image

URLImageObject

创作者个人资料图片的网址或 ImageObject(如果适用)。如果没有图片,请勿在此字段中添加默认图片、图标或占位符图片。

其他的图片指南:

  • 图片网址必须可抓取且可编入索引。如需检查 Google 能否访问您的网址,请使用网址检查工具
  • 图片必须代表标记的内容。
  • 图片必须采用受 Google 图片支持的文件格式。
  • 为取得最佳效果,建议您提供具有以下宽高比的多个高分辨率图片(宽度乘以高度至少为 50K 像素):16x9、4x3 和 1x1。

例如:

"image": [
  "https://example.com/photos/1x1/photo.jpg",
  "https://example.com/photos/4x3/photo.jpg",
  "https://example.com/photos/16x9/photo.jpg"
]
interactionStatistic

InteractionCounter

应用到个人资料页面实体的用户统计数据(如果适用)。请仅包含托管个人资料页面的平台的相关统计数据(请勿提及创作者在其首页上也有 10 万关注者)。

Google 可识别以下 interactionTypes

sameAs

URL

其他外部个人资料的网址,或个人资料首页的网址(如果适用)。

使用 Search Console 监控富媒体搜索结果

Search Console 是一款工具,可帮助您监控网页在 Google 搜索结果中的显示效果。即使没有注册 Search Console,您的网页也可能会显示在 Google 搜索结果中,但注册 Search Console 能够帮助您了解 Google 如何查看您的网站并做出相应的改进。建议您在以下情况下查看 Search Console:

  1. 首次部署结构化数据后
  2. 发布新模板或更新代码后
  3. 定期分析流量时

首次部署结构化数据后

等 Google 将网页编入索引后,请在相关的富媒体搜索结果状态报告中查看是否存在问题。 理想情况下,有效项目数量会增加,而无效项目数量不会增加。如果您发现结构化数据存在问题,请执行以下操作:

  1. 修正无效项目
  2. 检查实际网址,核实问题是否仍然存在。
  3. 使用状态报告请求验证

发布新模板或更新代码后

如果对网站进行重大更改,请监控结构化数据无效项目的增幅。
  • 如果您发现无效项目增多了,可能是因为您推出的某个新模板无法正常工作,或者您的网站以一种新的错误方式与现有模板交互。
  • 如果您发现有效项目减少了(但无效项目的增加情况并不对应),可能是因为您的网页中未再嵌入结构化数据。请通过网址检查工具了解导致此问题的原因。

定期分析流量时

请使用效果报告分析您的 Google 搜索流量。数据将显示您的网页在 Google 搜索结果中显示为富媒体搜索结果的频率、用户点击该网页的频率以及网页在搜索结果中的平均排名。您还可以使用 Search Console API 自动提取这些结果。

Troubleshooting

If you're having trouble implementing or debugging structured data, here are some resources that may help you.

  • If you're using a content management system (CMS) or someone else is taking care of your site, ask them to help you. Make sure to forward any Search Console message that details the issue to them.
  • Google does not guarantee that features that consume structured data will show up in search results. For a list of common reasons why Google may not show your content in a rich result, see the General Structured Data Guidelines.
  • You might have an error in your structured data. Check the list of structured data errors and the Unparsable structured data report.
  • If you received a structured data manual action against your page, the structured data on the page will be ignored (although the page can still appear in Google Search results). To fix structured data issues, use the Manual Actions report.
  • Review the guidelines again to identify if your content isn't compliant with the guidelines. The problem can be caused by either spammy content or spammy markup usage. However, the issue may not be a syntax issue, and so the Rich Results Test won't be able to identify these issues.
  • Troubleshoot missing rich results / drop in total rich results.
  • Allow time for re-crawling and re-indexing. Remember that it may take several days after publishing a page for Google to find and crawl it. For general questions about crawling and indexing, check the Google Search crawling and indexing FAQ.
  • Post a question in the Google Search Central forum.