コンテンツの ID、URL、名前を収集する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
カタログ内のすべてのエンティティには、以下のプロパティが必要です。
@id
: コンテンツのグローバル 識別子。
url
: コンテンツの正規 URL。
name
: コンテンツの名前。
@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)の形式
- コンテンツのローカル識別子(ID)が URI 形式でない場合は、ID の先頭にドメインを追加してこの要件を満たします。たとえば、コンテンツの ID が 1234abc でドメインが https://example.com の場合、
@id
は https://example.com/1234abc となります。
@id
が有効な URL である必要はなく、単に URI 形式にする必要があります。
@id
で使用するドメイン(たとえば https://example.com)は、自分の組織が所有するドメインでなければなりません。
エンティティの url
は識別子としてのすべての要件(グローバルに一意、静的、URI 形式)を満たしているため、エンティティの url
を @id
として使用することをおすすめします。
正規 URL
正規 URL(url
)は、Google がカタログ内のコンテンツを Google のデータベース内のコンテンツと正確に一致させるのに役立ちます。
「正規 URL とは、サイトにある一連の重複したページの中で、Google が最も代表的と考えるページの URL です。たとえば、同じページに複数の URL がある場合(例: example.com?dress=1234 と example.com/dresses/1234)、Google はそのうちの 1 つを正規 URL として選択します。」(出典: 重複する URL を統合する)
正規 URL の要件は次のとおりです。
url
はグローバルに一意である必要があります。
url
には Google がクロールすることが可能な機能する正規 URL を含める必要があります。
- (リッスン アクションのみ)
url
は、ペイウォールによってブロックされないコンテンツの説明ページを指す必要があります。
ID、URL、および名前の収集
次の手順に従います。
- カタログ内のコンテンツの名前を収集します。
- コンテンツの正規 URL を特定します(コンテンツの
url
を @id
として使用することをおすすめします)。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],[],[[["All catalog entities must have an `@id`, `url`, and `name` property for identification and discoverability."],["The `@id` should be a globally unique, static URI, preferably the same as the `url`."],["The `url` must be a working canonical URL for Google to crawl and reconcile content effectively, pointing to a public content description page for Listen Actions."],["You need to collect and provide the `name`, `url` (recommended for `@id`), and canonical `url` for each entity in your catalog."]]],["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"]]