Copy updates for the AdSense panel in Settings
Feature Description
Update the AdSense module panel on the Settings page with more detailed info (same style guide as the Analytics screen).
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
The AdSense Settings screen should display the following fields:
- Publisher ID in format pub-123456789 (retrieve from API)
- AdSense code: depending on the site status, should display either
- "AdSense code is placed on your site"
- "AdSense code is not placed on your site".
- Site status: displays text "Check your site status in Sites"
- Account status: depending on the account status returned via API, display one of the following texts:
- Pending (same logic as the user seeing the screens "Let’s get your site ready for ads" or "We’re getting your site ready for ads"): "We're getting your site ready for ads. This usually takes less than a day, but it can sometimes take a bit longer."
- Action required (same logic as the user seeing the screen "Your site isn’t ready to show ads yet"): "You need to fix some issues before your account is approved. Go to AdSense to find out how to fix it."
- Approved (same logic as showing stats (metrics are non-zero and account is approved)): "Your account has been approved."
- Module status (top right corner) -- depending on the status should display either:
- "AdSense is connected"
- "AdSense is not connected"
Analytics settings screen for UI reference:

Implementation Brief
Update assets/js/modules/adsense/settings/adsense-settings.js
- Update layout similar to Analytics setup (multi-column)
- Add column for Publisher ID
- Display value in format "pub-123456789" (matches
accountIDin AdSense settings)
- Display value in format "pub-123456789" (matches
- Add column for AdSense Code
- Display based on value of
useSnippetin settings - Should remain toggleable when editable
- Display based on value of
- Add column for Site Status
- Displays:
"Check your site status" (external link arrow)
- Displays:
- Add column for Account Status
- Display label based on current status
The module's connected status is already shown, and is filtered to allow for additional conditional logic: https://github.com/google/site-kit-wp/blob/bff18b3bb3f148e93b5e97f4a13c15cfe81ec093/assets/js/modules/adsense/index.js#L86-L95 Not clear if this requires changes.
Changelog entry
- Expand AdSense settings panel to expose more helpful information.
IB ✅
~~I've been looking at @Shavindra's work on this one (https://github.com/google/site-kit-wp/compare/develop...Shavindra:fix/585-update-adsense-settings?expand=1#diff-6edfef518c7c5cb3e9d453267a67ac11R188).~~
~~Getting the "Account Status" message into that component is absolutely escaping me. The logic and flow of this component is… baffling. Updating the state in the AdSenseSettings component (https://github.com/google/site-kit-wp/blob/develop/assets/js/modules/adsense/settings/adsense-settings.js#L42) doesn't seem to update the render, but also it doesn't ever seem to get an existingTag value that isn't false, even when there is a tag available, or should be. The message doesn't seem to be passed to the component when inserted here: https://github.com/google/site-kit-wp/blob/develop/assets/js/modules/adsense/setup/adsense-setup-instructions.js#L113~~
~~If removing the "Account Status" is acceptable here I think it should be removed from the IB and then this can be easily shipped. Otherwise this is going to be a rabbit-hole of engineering time trying to get that data into that component, unless I'm missing something. The existing approach to that component's data is heavily obscured and not straightforward. I'm concerned it will be a massive engineering effort for little gain.~~
Got this one sorted, never mind the previous comment 😄
Code review is ✅, assigning to merge 😄
Tested
Installed latest develop, activated SK and connected Adsense
Connected scenario:

Confirmed copy:
- Account status copy: "AdSense code is placed on your site"
- Publisher ID copy matched the ID in Google Adsense (pub-9003023971424122)
- Site Status: "Check your site status" This doesn't match the copy above "Check your site status in Sites" <-- Missing the word Sites

Clicking the site status link drives to the proper site ID

Confirmed module status copy "AdSense is connected"

Pending and Action Required scenario:
Connected Adsense and added snippet

Checked settings page:

Noticed missing copy for pending:
Pending (same logic as the user seeing the screens "Let’s get your site ready for ads" or "We’re getting your site ready for ads"): "We're getting your site ready for ads. This usually takes less than a day, but it can sometimes take a bit longer."
Sending this ticket back to adjust @ryanwelcher
Site Status: "Check your site status" This doesn't match the copy above "Check your site status in Sites" <-- Missing the word Sites
Good eye @cole10up!
There was a decision made to change this in the PR (https://github.com/google/site-kit-wp/pull/1379#issuecomment-614812737) that didn't get updated in the AC - I'll update this now. No change is necessary here 👍
Pending (same logic as the user seeing the screens "Let’s get your site ready for ads" or "We’re getting your site ready for ads"): "We're getting your site ready for ads. This usually takes less than a day, but it can sometimes take a bit longer."
I'm not sure if this is expected to change in this issue as it's only updating the settings view, not the logic for when that view is shown or not. What you're pointing to may be its own issue. @felixarntz Should this be done as part of this issue or a follow-up?
@aaemnnosttv Yeah, let's handle that separately. It shouldn't block this and will be more straightforward after the module refactoring.
Confirmed that this one is good to go per our group conversation today. Moving to Approval 👍