使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
我们使用一系列元标记来帮助扩展您的广告投放平台。下面列出了各种元标记及其用途。
元标记语法:
<meta name="google-adsense-platform-account" content="{host-property-code}">
其中的 {host-property-code} 如下所示:ca-host-pub-1234567890123456
。托管媒体资源代码是您的 AdSense 发布商 ID,前面附有“ca-host-”。您可以通过以下方式找到您的 AdSense 发布商 ID:访问 AdSense,然后依次点击账号 > 设置 > 账号信息。
对于“直接”模型,此元标记只有一个用途。它会自动向其所在网页中的所有 AdSense 广告请求添加 data-ad-host
参数。如果您在广告代码中添加了 data-ad-host
参数,则此操作是多余的。
如果网页上存在此标记的多个实例,系统会将网页上第一个标记的值传递到所有 AdSense 广告请求,并忽略第二个标记。
子账号
元标记语法:
<meta name="google-adsense-account" content="{sub-account}">
其中,{sub-account} 是账号名称中的第二个发布商 ID,前面附有“ca-”。示例为:ca-pub-0000000000000000。
在网站验证流程中,AdSense 会扫描网页并执行所有权检查。您可以通过多种方式帮助子账号通过所有权检查,包括通过 ads.txt、广告代码或此元标记。最佳方法取决于您的网址结构和其他因素。请与您的客户经理联系,咨询适合您平台的最佳方法。
元标记语法:
<meta name="google-adsense-platform-author" content="{creator-username}">
其中的 {creator-username} 是在此网页上创作内容的用户的公开 ID。我们仅要求针对网址结构是网址中不显示创建者 ID 的网域使用此元标记。请参阅以下示例情形:
使用场景 |
网址结构 |
是否需要元标记 |
子网域 |
根:
https://littlepig.example.com
内容:
https://littlepig.example.com/food.html
|
否 |
子文件夹 |
根:
https://example.com/littlepig
内容:
https://example.com/littlepig/food.html
|
否 |
子网域和子文件夹的组合 |
根:
https://sites.example.com/sites/littlepig
内容:
https://sites.example.com/sites/littlepig/food.html
|
否 |
单个网址 |
根(或者创作者个人资料):
https://example.com/user/littlepig
内容:
https://example.com/nf8ag4n
|
否 |
根据上表中的示例网址,元标记应如下所示:
<meta name="google-adsense-platform-author" content="littlepig">
根据此元标记中的信息,我们会按照内容检查系统中所用的平台用户来细分网址。尽管上表中显示不需要此元标记,我们还是建议您使用。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。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"]],[],[[["\u003cp\u003eMeta tags are used to optimize your platform for ad serving, including specifying platform account, sub-account, and platform author information.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egoogle-adsense-platform-account\u003c/code\u003e meta tag automatically adds the data-ad-host parameter to AdSense ad requests and contains your AdSense Publisher ID.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egoogle-adsense-account\u003c/code\u003e meta tag helps sub-accounts pass the ownership check during site verification and should be implemented based on consultation with your account manager.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egoogle-adsense-platform-author\u003c/code\u003e meta tag identifies the content creator and is used for content checking, and is recommended even if not strictly required based on URL structure.\u003c/p\u003e\n"]]],["Meta tags are used to scale ad serving. The `google-adsense-platform-account` tag adds the `data-ad-host` parameter to ad requests, using the AdSense publisher ID. The `google-adsense-account` tag, using a sub-account ID, aids in site verification. The `google-adsense-platform-author` tag, with the creator's public ID, segments URLs by platform users, primarily for content checking systems and it is recommended even when not required by the URL structure.\n"],null,[]]