Raccogliere l'ID, l'URL e il nome dei tuoi contenuti
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Tutte le entità del tuo catalogo richiedono le seguenti proprietà:
Esempio di @id
, url
e name
:
"@id": "http://www.example.com/episode/video/432432432",
"url": "http://www.example.com/episode/video/432432432",
"name": "My example episode",
Identificatore
Un identificatore (@id
) deve soddisfare i seguenti requisiti:
- Univoco a livello globale nel tuo catalogo
- Ad esempio, non utilizzare lo stesso
@id
per un TVSeries
e un TVSeason
.
- Statico
- Non puoi modificare
@id
in un secondo momento.
- Sotto forma di URI (Uniform Resource Identifier)
- Se l'identificatore locale (ID) dei tuoi contenuti non è in formato URI, anteponi il tuo dominio all'ID per soddisfare questo requisito. Ad esempio, se l'ID dei tuoi contenuti è 1234abc e il tuo dominio è https://example.com,
@id
può essere https://example.com/1234abc.
@id
non deve essere un URL funzionante, ma deve essere in formato URI.
- Il dominio utilizzato in
@id
(ad esempio https://example.com) deve essere di proprietà della tua organizzazione.
Poiché il url
di un'entità soddisfa tutti i requisiti di un identificatore (ovvero è univoco a livello globale, statico e sotto forma di URI), ti consigliamo di utilizzare il url
di un'entità come @id
.
URL canonico
Un URL canonico (url
) aiuta Google a riconciliare con precisione i contenuti del tuo catalogo con quelli dei database di Google.
"Un URL canonico è l'URL della pagina che Google ritiene più rappresentativa tra un insieme di pagine duplicate sul tuo sito. Ad esempio, se hai più URL per la stessa pagina (ad esempio example.com?dress=1234 ed example.com/dresses/1234), Google ne sceglie uno come canonico." (Fonte: Raggruppare URL duplicati)
Di seguito sono riportati i requisiti per l'URL canonico:
url
deve essere univoco a livello globale.
url
deve contenere un URL canonico funzionante che Google può eseguire la scansione.
- (Solo azioni di ascolto)
url
deve puntare a una pagina di descrizione dei contenuti non bloccata da un paywall.
Raccogliere l'ID, l'URL e il nome
Segui questi passaggi:
- Raccogliere i nomi dei contenuti nel tuo catalogo.
- Identifica gli URL canonici dei contenuti. Ti consigliamo di utilizzare il
url
dei contenuti come @id
.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
[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`.)"]]