question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Include AdSense for Platforms meta tag

See original GitHub issue

For sites with the AdSense module active, Site Kit should include the new AdSense for Platforms meta tag (see https://developers.google.com/adsense/platforms/transparent/meta-tags). It has the following shape: <meta name="google-adsense-platform-account" content="{host-publisher-id}">


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • When the AdSense module is active, the following meta tags should be placed in the frontend, to associate the site with Site Kit’s platform account (learn more):
    • <meta name="google-adsense-platform-account" content="ca-host-pub-2644536267352236">
    • <meta name="google-adsense-platform-domain" content="sitekit.withgoogle.com">
  • This should be regardless of whether the module is connected or whether the useSnippet option is enabled.

Implementation Brief

Important: Before merging any PR for this, please confirm with @felixarntz whether the Google side infrastructure is ready to go.

In Google\Site_Kit\Modules\AdSense class,

Test Coverage

  • Add tests for checking existence of the meta tags when adsense module is activated (whether fully connected or not).

Visual Regression Changes

  • Not needed.

QA Brief

  • Activate Adsense module.
  • Check for the existence platform tags from the AC in AMP and Non-AMP version of the website when the module is not fully connected.
  • Do the same for module fully connected state as well.

Changelog entry

  • Add AdSense for Platforms meta tag

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
felixarntzcommented, Oct 5, 2021

@eclarke1 @aaemnnosttv It’s now confirmed that this can go out in 1.43.0 as planned - so we don’t need to create another issue to comment out that code. 👍

1reaction
aaemnnosttvcommented, Sep 16, 2021

Great, thanks @kuasha420 !

IB ✅

Read more comments on GitHub >

github_iconTop Results From Across the Web

Meta tags - AdSense for Platforms - Google Developers
We use a series of meta tags to help scale your platform for ad serving. Below is a list of meta tags and...
Read more >
Different Meta Values on my site - WordPress.org
I noticed Site Kits ads Meta Tags on my site. Shouldn't these values have my information, such as my domain and account number?...
Read more >
Connect your site to AdSense - Google Support
Sign in to your AdSense account. · On the AdSense homepage, click Add site. · Enter the URL of the site that you...
Read more >
How to grow your website traffic - Google AdSense
Paid promotions are when you pay to advertise on other platforms or websites ... On a related note, always use social media meta...
Read more >
How to Properly Add Google AdSense to Your WordPress Site
The auto-ads code uses a single code snippet to generate ads everywhere on your WordPress blog. This means you need to add the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found