您请求访问的页面目前没有您的语言版本。您可以从页面底部选择其他语言,或使用 Google Chrome 的内置翻译功能将网页内容即时翻译成您选择的语言。

PageMaps

PageMaps is a structured data format that Google created to enable website creators to embed data and notes in their webpages. Although the structured data isn't visible to your users, and doesn't impact your site's listing in Google Web Search results, Programmable Search Engine recognizes it and can use it to add elements such as actions or custom attributes to search results pages.

Here's an example of a rich snippet that features two actions ("Download" and "Fullscreen View"):

A Programmable Search Engine rich snippet featuring two actions

You submit PageMaps in three ways. You can:

To see the PageMap data Google can extract from your page, use the rich snippets testing tool.

PageMap elements

Each element (for example, an action) that you want to add to a snippet is a DataObject. Each DataObject has a number of attributes, such as a label or URL, which you can customize as you choose.

Recognized DataObjects

You can create any type of DataObject you like, but Programmable Search Engine recognizes the DataObjects listed in the following table, and will render them in search results:

DataObject Required attributes
thumbnail src, height, width
action label, url, class
publication author, date, category
Add PageMap data directly to your HTML page

To create a PageMap, add a block of code to your HTML page, like this:

<!--
  <PageMap>
    <DataObject type="action">
      <Attribute name="label" value="Download"/>
      <Attribute name="url" value="http://www.scribd.com/document_downloads/20258723?extension=pdf"/>
      <Attribute name="class" value="download"/>
    </DataObject>

    <DataObject type="action">
      <Attribute name="label" value="Fullscreen View"/>
      <Attribute name="url" value="http://d1.scribdassets.com/ScribdViewer.swf?document_id=20258723&access_key=key-27lwdyi9z21ithon73g3&version=1&viewMode=fullscreen"/>
      <Attribute name="class" value="fullscreen"/>
    </DataObject>
  </PageMap>
-->

Be sure to enclose your PageMap inside <!-- and --> tags.

Add PageMap data to a Sitemap

If you don't want to include PageMap data in the HTML of your pages, you can add PageMap data to a Sitemap and submit that Sitemap for indexing via the Search Console.

Here's an example of a Sitemap that includes PageMap information for two URLs: http://www.example.com/foo and http://www.example.com/bar.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
       xmlns:content="http://www.google.com/schemas/sitemap-content/1.0">
 <url>
   <loc>http://www.example.com/foo</loc>
   <PageMap xmlns="http://www.google.com/schemas/sitemap-pagemap/1.0">
     <DataObject type="document" id="hibachi">
       <Attribute name="name">Dragon</Attribute>
       <Attribute name="review">3.5</Attribute>
     </DataObject>
   </PageMap>
 </url>
 <url>
   <loc>http://www.example.com/bar</loc>
   <PageMap xmlns="http://www.google.com/schemas/sitemap-pagemap/1.0">
     <DataObject type="document" id="biggreenegg">
       <Attribute name="name">Ribs</Attribute>
       <Attribute name="review">4.0</Attribute>
     </DataObject>
   </PageMap>
 </url>
</urlset>

PageMap tag definitions

The following table outlines the requirements for adding PageMap data to a sitemap. For more information about creating Sitemaps, including basic tag definitions, see Creating Sitemaps.

Tag Required? Description
PageMap Yes Encloses all PageMap information for the relevant URL.
DataObject Yes Encloses all information about a single element (for example, an action) that should appear in the Programmable Search Engine result.
Attribute Yes Each DataObject contains one or more attributes.

(If you’re a developer, you can take advantage of the flexibility of PageMaps to add extra functionality to your search results. More information. )

Search
Clear search
Close search
Main menu
5599948196205619247
true
Search Help Center
true
true
true
false
false