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

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

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

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

How to add structured data

Structured data is a standardized format for providing information about a page and classifying the page content. If you're new to structured data, you can learn more about how structured data works.

Here's an overview of how to build, test, and release structured data.

  1. Add the required properties. Based on the format you're using, learn where to insert structured data on the page.
  2. Follow the guidelines.
  3. Validate your code using the Rich Results Test and fix any critical errors. Consider also fixing any non-critical issues that may be flagged in the tool, as they can help improve the quality of your structured data (however, this isn't necessary to be eligible for rich results).
  4. Deploy a few pages that include your structured data and use the URL Inspection tool to test how Google sees the page. Be sure that your page is accessible to Google and not blocked by a robots.txt file, the noindex tag, or login requirements. If the page looks okay, you can ask Google to recrawl your URLs.
  5. To keep Google informed of future changes, we recommend that you submit a sitemap. You can automate this with the 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

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

Monitor rich results with Search Console

Search Console is a tool that helps you monitor how your pages perform in Google Search. You don't have to sign up for Search Console to be included in Google Search results, but it can help you understand and improve how Google sees your site. We recommend checking Search Console in the following cases:

  1. After deploying structured data for the first time
  2. After releasing new templates or updating your code
  3. Analyzing traffic periodically

After deploying structured data for the first time

After Google has indexed your pages, look for issues using the relevant Rich result status report. Ideally, there will be an increase of valid items, and no increase in invalid items. If you find issues in your structured data:

  1. Fix the invalid items.
  2. Inspect a live URL to check if the issue persists.
  3. Request validation using the status report.

After releasing new templates or updating your code

When you make significant changes to your website, monitor for increases in structured data invalid items.
  • If you see an increase in invalid items, perhaps you rolled out a new template that doesn't work, or your site interacts with the existing template in a new and bad way.
  • If you see a decrease in valid items (not matched by an increase in invalid items), perhaps you are no longer embedding structured data in your pages. Use the URL Inspection tool to learn what is causing the issue.

Analyzing traffic periodically

Analyze your Google Search traffic using the Performance Report. The data will show you how often your page appears as a rich result in Search, how often users click on it and what is the average position you appear on search results. You can also automatically pull these results with the Search Console API.

问题排查

如果您在实施或调试结构化数据时遇到问题,请查看下面列出的一些实用资源。

  • 如果您使用了内容管理系统 (CMS) 或其他人负责管理您的网站,请向其寻求帮助。请务必向其转发列明问题细节的任何 Search Console 消息。
  • Google 不能保证使用结构化数据的功能一定会显示在搜索结果中。如需查看导致 Google 无法将您的内容显示为富媒体搜索结果的各种常见原因,请参阅结构化数据常规指南
  • 您的结构化数据可能存在错误。请参阅结构化数据错误列表
  • 如果您的网页受到结构化数据手动操作的影响,其中的结构化数据将会被忽略(但该网页仍可能会出现在 Google 搜索结果中)。如需修正结构化数据问题,请使用“人工处置措施”报告
  • 再次查看相关指南,确认您的内容是否未遵循指南。问题可能是因为出现垃圾内容或使用垃圾标记导致的。不过,问题可能不是语法问题,因此富媒体搜索结果测试无法识别这些问题。
  • 针对富媒体搜索结果缺失/富媒体搜索结果总数下降进行问题排查
  • 请等待一段时间,以便 Google 重新抓取您的网页并重新将其编入索引。请注意,网页发布后,Google 可能需要几天时间才会找到和抓取该网页。有关抓取和索引编制的常见问题,请参阅 Google 搜索抓取和索引编制常见问题解答
  • Google 搜索中心论坛中发帖提问。