รวบรวมรหัส, URL และชื่อของเนื้อหา
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เอนทิตีทั้งหมดในแคตตาล็อกต้องมีพร็อพเพอร์ตี้ต่อไปนี้
ตัวอย่าง @id
, url
และ name
"@id": "http://www.example.com/episode/video/432432432",
"url": "http://www.example.com/episode/video/432432432",
"name": "My example episode",
ตัวระบุ
ตัวระบุ (@id
) ต้องเป็นไปตามข้อกำหนดต่อไปนี้
- เฉพาะสำหรับแคตตาล็อกของคุณทั่วโลก
- เช่น อย่าใช้
@id
เดียวกันสำหรับ TVSeries
และ TVSeason
- คงที่
- คุณจะเปลี่ยน
@id
ในภายหลังไม่ได้
- ในรูปแบบ Unified Resource Identifier (URI)
- หากตัวระบุ (รหัส) ของเนื้อหาไม่ได้อยู่ในรูปแบบ URI ให้ใส่โดเมนไว้หน้ารหัสเพื่อให้เป็นไปตามข้อกำหนดนี้ เช่น หากรหัสของเนื้อหาคือ 1234abc และโดเมนของคุณคือ https://example.com
@id
อาจเป็น https://example.com/1234abc
@id
ไม่จำเป็นต้องเป็น URL ที่ใช้งานได้ เพียงแค่ต้องอยู่ในรูปแบบ URI
- โดเมนที่ใช้ใน
@id
(เช่น https://example.com) ต้องเป็นขององค์กรคุณ
เนื่องจาก url
ของเอนทิตีโฟมเป็นไปตามข้อกำหนดทั้งหมดสำหรับตัวระบุ (นั่นคือ เป็นแบบคงที่ ซ้ำกันไม่ได้ทั่วโลก และอยู่ในรูปแบบของ URI) เราจึงขอแนะนำให้คุณใช้ url
ของเอนทิตีโฟมเป็น @id
Canonical URL
Canonical URL (url
) ช่วยให้ Google ปรับเนื้อหาในแคตตาล็อกให้ตรงกับเนื้อหาในฐานข้อมูลของ Google อย่างถูกต้อง
"Canonical URL คือ URL ของหน้าที่ Google คิดว่าเป็นตัวแทนที่ดีที่สุดของหน้าต่างๆ ที่ซ้ำกันในเว็บไซต์ของคุณ ตัวอย่างเช่น หากคุณมี URL หลายรายการสําหรับหน้าเดียวกัน (เช่น example.com?dress=1234 และ example.com/dresses/1234) Google จะเลือก URL หนึ่งเป็น Canonical URL" (แหล่งที่มา: รวม URL ที่ซ้ำกัน)
ข้อกำหนดสำหรับ Canonical URL มีดังนี้
url
ต้องไม่ซ้ำกันทั่วโลก
url
ต้องมี Canonical URL ที่ใช้งานได้ซึ่ง Google ทำการ Crawl ได้
- (การดำเนินการฟังเท่านั้น)
url
ต้องชี้ไปยังหน้าคำอธิบายเนื้อหาที่ไม่ได้ถูกบล็อกโดยเพย์วอลล์
รวบรวมรหัส, URL และชื่อ
ทำสิ่งต่อไปนี้:
- รวบรวมชื่อเนื้อหาในแคตตาล็อก
- ระบุ Canonical URL ของเนื้อหา (เราขอแนะนำให้คุณใช้
url
ของเนื้อหาเป็น @id
ของเนื้อหานั้น)
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ 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`.)"]]