Meta tags
We use a series of meta tags to help scale your platform for ad serving. Below is a list of meta tags and their purpose.
Platform account
Meta tag syntax:
<meta name="google-adsense-platform-account" content="{host-property-code}">
Where {host-property-code} looks like this: ca-host-pub-1234567890123456
. The host property code is your AdSense publisher ID, with "ca-host-" prepended to it. You can find your AdSense publisher ID by visiting AdSense: Account > Settings > Account information.
This meta tag has three purposes, it:
- Helps AdSense customize onboarding instructions for custom domains
If a user on a custom domain visits AdSense directly to either sign-up for a new account, or add their site to their current account, and AdSense detects this meta tag on the page with your host property code, then AdSense will show the user the custom onboarding instructions you selected for the sign-up flow. - Helps your platform implement ads.txt in a scalable way
If a platform already has pre-existing AdSense ad codes on its pages, or allows its users to add AdSense ad codes by themselves, it can be difficult to update the ad tags to ensure they have the data-ad-host parameter (see the ads.txt section to understand why this is important). The meta tag is used to automatically add a data-ad-host parameter to all AdSense ad requests originating from that page, unless the ad code that issued the ad request already has a data-ad-host parameter set. This means that the ads.txt file can be just one line, using the host publisher ID. - Enables platform wide performance reporting and revenue-share
As explained above, the meta tag ensures that all AdSense ad requests on the page have the data-ad-host parameter present (unless the ad code that generated the ad request already has the data-ad-host parameter present). As all ad requests will have the host publisher ID, this traffic will start appearing in the platform AdSense account. If your platform has a revenue share set, this revenue share will start applying to all traffic on the platform as well.
If there are multiple instances of this tag on the page, the value of the first tag on the page is passed to all AdSense ad requests, and the second tag is ignored.
Child account
Meta tag syntax:
<meta name="google-adsense-account" content="{child-account}">
Where {child-account} is the ad client from the AdSense for Content ad client name. It will look like this: ca-pub-0000000000000000.
During the site verification process, AdSense will scan pages and perform an ownership check. There are multiple ways to help child accounts pass the ownership check, including through ads.txt, ad codes or this meta tag. The best approach will depend on your URL structure and other factors. Please contact your account manager for a consultation on the best approach for your platform.
Platform domain
Meta tag syntax:
<meta name="google-adsense-platform-domain" content="{platform-domain}">
Where {platform-domain} will be the domain provided to your account manager during the initial configuration.
If your platform supports custom domains, we use this meta tag to show customized onboarding instructions to your users (in combination with the "google-adsense-platform-account" meta tag) if they choose to add their site directly in AdSense instead of starting the process in your platform's console.
Platform author URL
Meta tag syntax:
<meta name="google-adsense-platform-author-url" content="{author-url}">
Where {author-url} is the public root URL, or profile URL of the user who created the content on this page. We only require this meta tag for domains where the URL structure is such that the ID of the creator isn't available in the URL. See the example scenarios below:
Use case | URL structure | {author-url} value | Is meta tag required? |
---|---|---|---|
Subdomains |
Root: https://littlepig.example.com Content: https://littlepig.example.com/food.html |
littlepig.example.com | No |
Sub folders |
Root: https://example.com/littlepig Content: https://example.com/littlepig/food.html |
example.com/littlepig | No |
Combination of subdomains and sub folders |
Root: https://sites.example.com/sites/littlepig Content: https://sites.example.com/sites/littlepig/food.html |
sites.example.com/sites/littlepig | No |
Individual URLs |
Root (or creator profile): https://example.com/user/littlepig Content: https://example.com/nf8ag4n |
example.com/user/littlepig | No |
As an example for the "Individual URLs" use case, the meta tag should look like this:
<meta name="google-adsense-platform-author-url" content="example.com/user/littlepig">
We use the information in this meta tag to segment URLs by platform users which is used in our content checking systems. We recommend having this meta tag present, even if not required as per the table above.