Thu thập mã nhận dạng, URL và tên cho nội dung của bạn
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tất cả các thực thể trong danh mục của bạn đều phải có các thuộc tính sau:
Ví dụ về @id
, url
và name
:
"@id": "http://www.example.com/episode/video/432432432",
"url": "http://www.example.com/episode/video/432432432",
"name": "My example episode",
Số nhận dạng
Giá trị nhận dạng (@id
) phải đáp ứng các yêu cầu sau:
- Duy nhất trên toàn bộ danh mục của bạn
- Ví dụ: không sử dụng cùng một
@id
cho TVSeries
và TVSeason
.
- Tĩnh
- Bạn không thể thay đổi
@id
sau này.
- Ở dạng Giá trị nhận dạng tài nguyên hợp nhất (URI)
- Nếu giá trị nhận dạng cục bộ (mã nhận dạng) của nội dung không ở định dạng URI, hãy thêm miền của bạn vào mã nhận dạng để đáp ứng yêu cầu này; ví dụ: nếu mã nhận dạng của nội dung là 1234abc và miền của bạn là https://example.com, thì
@id
có thể là https://example.com/1234abc.
@id
không nhất thiết phải là một URL đang hoạt động; chỉ cần ở định dạng URI.
- Miền được dùng trong
@id
(ví dụ: https://example.com) phải thuộc sở hữu của tổ chức của bạn.
Vì url
của một thực thể đáp ứng tất cả các yêu cầu của một giá trị nhận dạng (tức là duy nhất trên toàn cầu, tĩnh và ở dạng URI), nên bạn nên sử dụng url
của thực thể làm @id
.
URL chuẩn
URL chính tắc (url
) giúp Google điều chỉnh nội dung trong danh mục của bạn sao cho khớp với nội dung trong cơ sở dữ liệu của Google.
"URL chính tắc là URL của trang mà Google đánh giá là tiêu biểu nhất trong số những trang trùng lặp trên trang web của bạn. Ví dụ: nếu bạn có nhiều URL cho cùng một trang (ví dụ: example.com?dress=1234 và example.com/dresses/1234), thì Google sẽ chọn một URL trong số đó làm URL chính tắc". (Nguồn: Hợp nhất các URL trùng lặp)
Sau đây là các yêu cầu đối với URL chính tắc:
url
phải là duy nhất trên toàn hệ thống.
url
phải chứa một URL chính tắc đang hoạt động mà Google có thể thu thập dữ liệu.
- (Chỉ dành cho Hành động nghe)
url
cần trỏ đến một trang mô tả nội dung không bị tường phí chặn.
Thu thập mã nhận dạng, URL và tên
Hãy thực hiện như sau:
- Thu thập tên của nội dung trong danh mục.
- Xác định URL chính tắc của nội dung. (Bạn nên sử dụng
url
của nội dung làm @id
.)
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
[null,null,[],[[["\u003cp\u003eAll catalog entities must have an \u003ccode\u003e@id\u003c/code\u003e, \u003ccode\u003eurl\u003c/code\u003e, and \u003ccode\u003ename\u003c/code\u003e property for identification and discoverability.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e@id\u003c/code\u003e should be a globally unique, static URI, preferably the same as the \u003ccode\u003eurl\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eurl\u003c/code\u003e must be a working canonical URL for Google to crawl and reconcile content effectively, pointing to a public content description page for Listen Actions.\u003c/p\u003e\n"],["\u003cp\u003eYou need to collect and provide the \u003ccode\u003ename\u003c/code\u003e, \u003ccode\u003eurl\u003c/code\u003e (recommended for \u003ccode\u003e@id\u003c/code\u003e), and canonical \u003ccode\u003eurl\u003c/code\u003e for each entity in your catalog.\u003c/p\u003e\n"]]],["Entities require `@id`, `url`, and `name` properties. `@id` must be a globally unique, static URI, which can be a prepended domain to a local ID. `url` must be a globally unique, working canonical URL, crawlable by Google. It's recommended to use the `url` as the `@id` because it satisfies the identifier requirements. The process involves collecting content names and identifying their canonical URLs.\n"],null,["# Collect the ID, URL, and name of your content\n\nAll the entities in your catalog require the following properties:\n\n- `@id`: A global [identifier](#identifier) for the content.\n- `url`: A [canonical URL](#canonical_url) for the content.\n- `name`: The name of the content.\n\nExample of `@id`, `url`, and `name`: \n\n \"@id\": \"http://www.example.com/episode/video/432432432\",\n \"url\": \"http://www.example.com/episode/video/432432432\",\n \"name\": \"My example episode\",\n\nIdentifier\n----------\n\nAn identifier (`@id`) must meet the following requirements:\n\n- Globally unique across your catalog\n - For instance, don't use the same `@id` for a `TVSeries` and a `TVSeason`.\n- Static\n - You cannot change `@id` later.\n- In the form of Unified Resource Identifier (URI)\n - If your content's local identifier (ID) is not in a URI format, prepend your domain to the ID to satisfy this requirement; for example, if your content's ID is *1234abc* and your domain is *https://example.com* , `@id` can be *https://example.com/1234abc.*\n - `@id` does not have to be a working URL; it only needs to be in a URI format.\n - The domain used in `@id` (for example, *https://example.com*) must be owned by your organization.\n\nBecause an entity's `url` meets all the requirements as an identifier (that is, globally unique, static, and in the form of a URI), we recommend you use an entity's `url` as `@id`.\n\nCanonical URL\n-------------\n\nA canonical URL (`url`) helps Google accurately reconcile the content in your catalog with the content in Google's databases.\n\n\"A canonical URL is the URL of the page that Google thinks is most representative from a set of duplicate pages on your site. For example, if you have URLs for the same page (for example: *example.com?dress=1234* and *example.com/dresses/1234* ), Google chooses one as canonical.\" (Source: [Consolidate duplicate URLs](https://support.google.com/webmasters/answer/139066))\n\nThe following are the requirements for the canonical URL:\n\n- `url` must be globally unique.\n- `url` must contain a working canonical URL that Google can crawl.\n- (Listen Actions only) `url` needs to point to a content description page that is not blocked by a paywall.\n\nCollect the ID, URL, and name\n-----------------------------\n\nDo the following:\n\n1. Gather the names of the content in your catalog.\n2. Identify the canonical URLs of the content. (We recommend you use the content's `url` as its `@id`.)"]]