google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.23k stars 283 forks source link

Provide basic ads.txt generation #7049

Open jamesozzie opened 1 year ago

jamesozzie commented 1 year ago

Feature Description

With the AdSense platform pushing for users to create an ads.txt file, allow Site Kit to create a basic ads.txt file for users when none is detected. This could be created by default during setup, or there could be an option within the AdSense settings in Site Kit to place such a file if none exists.

A basic ads.txt file generated via Site Kit could include the following, where pub-0000000000000000 is the users own publisher ID: google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

An example of how this may work could be below:

If no ads.txt file is present:

adstxt1

If an ads.txt file is present - the toggle is greyed out to limit the possibility of users overwriting:

adstxt2

To justify this addition, below you'll see some of the warnings from adsense.google.com that users face without having an ads.txt file present.

image

image

There was a previous GitHub issue for this request:

Ads.txt queries in the support forums is also something that appears frequently, with some examples below:


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

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

jamesozzie commented 1 year ago

Another request in the support forums for this: https://wordpress.org/support/topic/when-will-we-have-auto-add-ads-txt-file/

aberbotimue commented 1 year ago

This makes so much sense, the plugin is supposed to do everything.. odd to miss out something that is required.

RavanH commented 11 months ago

i was so surprised to learn this feature is not already in there...