Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Estrutura da subconta
A estrutura de URL da sua plataforma é o principal fator que determina como as subcontas precisam ser estruturadas e, mais especificamente, como o campo site_uri deve ser.
Confira abaixo os diferentes tipos de estruturas de sites com suporte à AFP:
Caso de uso
Estrutura do URL
Valor do campo site_uri na API
Valor do campo request_id na API
Subdomínios
Raiz: https://littlepig.example.com
Conteúdo: https://littlepig.example.com/food.html
littlepig.example.com
littlepig (ou um ID exclusivo interno associado ao usuário)
Subpastas
Raiz: https://example.com/littlepig ou https://example.com/sites/littlepig
Conteúdo: https://example.com/littlepig/food.html ou https://example.com/sites/littlepig/food.html
example.com/littlepig ou example.com/sites/littlepig
littlepig (ou um ID exclusivo interno associado ao usuário)
littlepig (ou um ID exclusivo interno associado ao usuário)
URLs individuais
Raiz (ou perfil do criador): https://example.com/user/littlepig
Conteúdo: https://example.com/nf8ag4n
example.com/user/littlepig
Importante:para este caso de uso, também é necessário que a metatag"Platform author" esteja presente em todas as páginas.
littlepig (ou um ID exclusivo interno associado ao usuário)
Como criar subcontas se os usuários tiverem várias propriedades na sua plataforma
As subcontas devem ser mapeadas para usuários. Se um único usuário puder ter mais de uma propriedade (por exemplo, um subdomínio, uma pasta ou páginas de perfil) na sua plataforma, a subconta mapeada para esse usuário precisará conter todas as propriedades associadas a ele.
O valor de "request_id" neste cenário
Se a sua plataforma permitir várias propriedades por usuário, recomendamos usar um identificador exclusivo interno para o usuário no campo request_id. No futuro, o método da API para buscar contas vai permitir buscar contas com base no valor desse campo.
[null,null,[],[[["\u003cp\u003eSub-account structure depends on your platform's URL structure, determining the \u003ccode\u003esite_uri\u003c/code\u003e field's value.\u003c/p\u003e\n"],["\u003cp\u003eAFP supports various site structures like subdomains, subfolders, their combination, and individual URLs, each with specific \u003ccode\u003esite_uri\u003c/code\u003e formats.\u003c/p\u003e\n"],["\u003cp\u003eSub-accounts represent users and should encompass all properties owned by a single user, even if they have multiple websites or profiles.\u003c/p\u003e\n"],["\u003cp\u003eFor platforms with multiple properties per user, utilize an internal unique user identifier for the \u003ccode\u003erequest_id\u003c/code\u003e field, enabling future account retrieval.\u003c/p\u003e\n"],["\u003cp\u003eCurrently, adding multiple \u003ccode\u003esite_uri\u003c/code\u003e instances to a single account requires consultation with your account manager due to API limitations.\u003c/p\u003e\n"]]],["The sub-account structure is determined by the platform's URL structure, defining the `site_uri` field. Supported structures include subdomains, subfolders, a combination of both, and individual URLs. For subdomains, `site_uri` is the subdomain; for subfolders, it's the root path. The `request_id` should be a unique identifier. If users have multiple properties, sub-accounts must include all associated properties, and it's advised to use a unique user ID for `request_id`. The API currently only supports one instance of `site_uri` per account.\n"],null,["Sub-account structure\n---------------------\n\nThe URL structure of your platform is the main driver for how your sub-accounts should be structured, and more specifically, what the `site_uri` field should look like.\n\nSee below the different types of site structures AFP supports:\n\n| Use case | URL structure | Value of `site_uri` field in API | Value of `request_id` field in API |\n|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|\n| Subdomains | Root: `https://littlepig.example.com` \u003cbr /\u003e Content: `https://littlepig.example.com/food.html` | `littlepig.example.com` | `littlepig` (or an internal unique ID associated with the user) |\n| Sub folders | Root: `https://example.com/littlepig` or `https://example.com/sites/littlepig` \u003cbr /\u003e Content: `https://example.com/littlepig/food.html` or `https://example.com/sites/littlepig/food.html` | `example.com/littlepig` or `example.com/sites/littlepig` | `littlepig` (or an internal unique ID associated with the user) |\n| Combination of subdomains and sub folders | Root: `https://sites.example.com/sites/littlepig` \u003cbr /\u003e Content: `https://sites.example.com/sites/littlepig/food.html` | `sites.example.com/sites/littlepig` | `littlepig` (or an internal unique ID associated with the user) |\n| Individual URLs | Root (or creator profile): `https://example.com/user/littlepig` \u003cbr /\u003e Content: `https://example.com/nf8ag4n` | `example.com/user/littlepig` \u003cbr /\u003e **Important:** for this use case, we additionally require the [\"Platform author\" meta tag](/adsense/platforms/direct/meta-tags#platform_author) to be present on all pages. | `littlepig` (or an internal unique ID associated with the user) |\n\nHow to create sub-accounts if your users have multiple properties on your platform\n----------------------------------------------------------------------------------\n\nSub-accounts are intended to be mapped to users. If a single user can own more than one property (i.e. a subdomain or folder, or profile pages) on your platform, the sub-account mapped to that user must contain all of the properties associated with that user.\n\n### The value for \"request_id\" in this scenario\n\nIf your platform allows multiple properties per user, we recommend using an internal unique identifier for the user in the `request_id` field. In the future, the [get account API method](/adsense/platforms/reference/rest/v1alpha/platforms.accounts/get) will allow getting accounts based on the value of this field.\n| **Note:** Currently the Platforms API doesn't have a sites method to add multiple instances of `site_uri` to one account, and the account creation API only supports one instance of `site_uri`. Please speak with your account manager if your platform fits this type of structure."]]