site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

Copy updates for the AdSense panel in Settings

Open OisinOConnor opened this issue 7 years ago • 8 comments

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: VNqb3EdVhXv

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 accountID in AdSense settings)
  • Add column for AdSense Code
    • Display based on value of useSnippet in settings
    • Should remain toggleable when editable
  • Add column for Site Status
  • 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.

OisinOConnor avatar Sep 24 '19 08:09 OisinOConnor

IB ✅

felixarntz avatar Nov 04 '19 14:11 felixarntz

~~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.~~

tofumatt avatar Feb 21 '20 15:02 tofumatt

Got this one sorted, never mind the previous comment 😄

tofumatt avatar Feb 21 '20 16:02 tofumatt

Code review is ✅, assigning to merge 😄

tofumatt avatar Apr 15 '20 21:04 tofumatt

Tested

Installed latest develop, activated SK and connected Adsense

Connected scenario:

image

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 image

Clicking the site status link drives to the proper site ID image

Confirmed module status copy "AdSense is connected" image

Pending and Action Required scenario:

Connected Adsense and added snippet image

Checked settings page: image

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

cole10up avatar Apr 22 '20 07:04 cole10up

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 avatar Apr 22 '20 08:04 aaemnnosttv

@aaemnnosttv Yeah, let's handle that separately. It shouldn't block this and will be more straightforward after the module refactoring.

felixarntz avatar Apr 22 '20 16:04 felixarntz

Confirmed that this one is good to go per our group conversation today. Moving to Approval 👍

aaemnnosttv avatar Apr 22 '20 17:04 aaemnnosttv