Sponsored Content
The Wayback Machine - https://web.archive.org/web/20220409071912/https://github.com/google/site-kit-wp/issues/317
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add date filters for relevant metrics in AdSense dashboard #317

Closed
lilybonney opened this issue Jul 21, 2019 · 19 comments
Closed

Add date filters for relevant metrics in AdSense dashboard #317

lilybonney opened this issue Jul 21, 2019 · 19 comments
Labels
Module: AdSense P1 Type: Enhancement
Milestone

Comments

@lilybonney
Copy link
Collaborator

@lilybonney lilybonney commented Jul 21, 2019 •

Feature Description

In the Search Console and Analytics dashboard there is a date filter:

Date Filter

However, this is not present in the AdSense dashboard screen. The "Estimated Earnings" widget doesn't need date filter, but the other two statistics on this screen would benefit from it.

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

Acceptance criteria

  • There should be a date picker on top of the AdSense module page, similar like it is on e.g. the Analytics module page.
  • The "Estimated Earnings" widget should be removed entirely.
  • The first "Performance over previous 28 days" should be updated:
    • Title should change to "Performance over the last 28 days" (suffix should be based on current date range like in e.g. Analytics module page), for consistency with date picker and similar headings in e.g. Analytics module page.
    • There should be two additional columns in the widget:
      • The "Earnings" value for the current period should be the first column, before "Page RPM".
      • The "Page CTR" value for the current period should be the fourth column, after "Impressions" (the AdSense metric is called PAGE_VIEWS_CTR).
    • The values (i.e. the respective queries) should be based on the currently selected date range.
    • "Advanced Settings" should change to "See full stats in AdSense".
  • The second "Performance over previous 28 days" should be updated:
    • Title should change to "Performance by page over the last 28 days" (suffix should be based on current date range like in e.g. Analytics module page).
    • The values (i.e. the respective queries) should be based on the currently selected date range.
    • "Advanced Settings" should change to "See full stats in AdSense".

Implementation Brief

  • In assets/js/modules/adsense/index.legacy.js add the googlesitekit.showDateRangeSelector-${ slug } to return true to display the DateRangeSelector component in the AdSense page.
  • Wrap the AdSenseDashboardWidget with the withSelect HOC from Data that adds the dateRange prop using the getDateRange selector from core/user
  • import the getCurrentDateRange to use for displaying the date range in other components.
  • Remove the <Layout /> component from AdSenseDashboardWidget component that represents the Estimated earnings section.
  • Update the titles for each remaining Layout components to reflect date range as per the AC.
  • Refactor the AdSensePerformanceWidget to be a functional component.
  • Refactor the withData settings in AdSensePerformanceWidget to use the getReport selector from the modules/adsense datastore passing metrics: [ 'EARNINGS', 'PAGE_VIEWS_RPM', 'IMPRESSIONS', 'PAGE_VIEWS_CTR' ], to retrieve the PAGE_VIEWS_CTR data point
  • Add the new Earnings and Page CTR columns to the AdSensePerformanceWidget
  • Ensure that all values are being updated to reflect the selected date range.
  • Update all Advanced Settings text to See fill stats in AdSense
  • Finish and merge #1971

QA Brief

  • The date picker should be available on the AdSense dashboard page
  • The Estimated Earnings module should no longer exist.
  • The title of the first modules should read Performance over the last XX days where the XX is the currently selected date range.
  • The first module should have 4 sections:
    • Earnings, Page RPM, Impressions, and Page CTA
    • They should all update their values based on changes to the date range selector.
  • The title of the second modules should read Performance by page over the last XX days where the XX is the currently selected date range.
  • The data for the second module should update when the date range is changed.
  • External link for both modules should say See full stats in AdSense with the external link icon.

Changelog entry

  • Make AdSense module page UI more consistent with other modules, allowing to filter information by date instead of showing at-a-glance information for different date periods.
@lilybonney lilybonney added the Type: Enhancement label Jul 21, 2019
@OisinOConnor
Copy link

@OisinOConnor OisinOConnor commented Feb 20, 2020

Hi Lily,
As you said, could we add a date picker to the 2nd & 3rd charts in the AdSense dashboard screen. Best to match the way it is implemented in Search Console, Analytics & other screens. The titles of the 2nd & 3rd screens will need to change as they currently include "over previous 28 days".
sC99FV47RZV
The date picker should include "today" as well as the same options as the other products: 7, 14, 28, 90 days.

@marrrmarrr
Copy link
Collaborator

@marrrmarrr marrrmarrr commented Mar 16, 2020

Hey @OisinOConnor, is there a more descriptive name you'd suggest for the section called "Other metrics"?

@marrrmarrr marrrmarrr added the P1 label Mar 16, 2020
@felixarntz
Copy link
Member

@felixarntz felixarntz commented May 4, 2020

@OisinOConnor Could you provide an update on this?

@OisinOConnor
Copy link

@OisinOConnor OisinOConnor commented May 28, 2020

Possibly:

  • Performance metrics
  • Site performance

@felixarntz
Copy link
Member

@felixarntz felixarntz commented Aug 17, 2020

@marrrmarrr Updated ACs based on our conversation earlier. I also included a note to change the "Advanced Settings" text to "See full stats in AdSense", which makes more sense here and is in line with what we display in the same place for Analytics.

I opened #1921 for the separate follow-up task to introduce a graph for these metrics over the period to this screen like we said earlier.

@cheryl-cherylfischer
Copy link

@cheryl-cherylfischer cheryl-cherylfischer commented Aug 17, 2020

@felixarntz
Copy link
Member

@felixarntz felixarntz commented Aug 29, 2020

@ryanwelcher IB mostly looks good, just one thing:

Add PAGE_VIEWS_CTR to the array of metrics in includes/Modules/AdSense.php

These metrics being set in PHP is now somewhat legacy, that datapoint as of #1776 supports requesting specific metrics from the client. So rather than altering that server-side default (which only exists for backward-compatibility), let's modify the client-side request to include a metrics field with all four metrics.

@felixarntz
Copy link
Member

@felixarntz felixarntz commented Aug 31, 2020

IB ✅

@felixarntz felixarntz assigned ryanwelcher and unassigned felixarntz Aug 31, 2020
@ryanwelcher ryanwelcher removed their assignment Sep 1, 2020
@eclarke1 eclarke1 added this to the Sprint 32 milestone Sep 8, 2020
@felixarntz felixarntz added the Module: AdSense label Sep 11, 2020
@ryanwelcher ryanwelcher self-assigned this Sep 16, 2020
@eclarke1 eclarke1 removed the Next Up label Sep 17, 2020
@cole10up cole10up assigned ryanwelcher and unassigned cole10up Oct 19, 2020
@ryanwelcher
Copy link
Contributor

@ryanwelcher ryanwelcher commented Oct 19, 2020 •

Items to note:
The green check for 'Adsense is connected' is not clearing itself

@cole10up I believe this is expected behavior.

@ryanwelcher
Copy link
Contributor

@ryanwelcher ryanwelcher commented Oct 21, 2020

@cole10up @felixarntz - @aaemnnosttv and I were able to reproduce the zero data issue and it's related to withData. @aaemnnosttv is going to open a ticket to address it separately.

@aaemnnosttv
Copy link
Collaborator

@aaemnnosttv aaemnnosttv commented Oct 21, 2020

It turns out the issue was local to the AdSenseDashboardWidget component which tracks zeroData separately from withData. It's been fixed in #2224 👍

@aaemnnosttv aaemnnosttv assigned cole10up and unassigned aaemnnosttv Oct 21, 2020
@aaemnnosttv
Copy link
Collaborator

@aaemnnosttv aaemnnosttv commented Oct 21, 2020

@cole10up ready for another pass 👍

@cole10up
Copy link

@cole10up cole10up commented Oct 21, 2020 •

Retested

Was able to confirm 0 data doesn't corrupt the date sort.

Site Kit by Google AdSense ‹ Hellogoodbye — WordPress (2)

Noticed the Page Performance box, when loading shows multiple rows prior to finishing the load. Not a show stopper but something to note.

Passed QA ✅

@cole10up cole10up removed their assignment Oct 21, 2020
@cole10up
Copy link

@cole10up cole10up commented Oct 23, 2020

During smoke testing with the latest release I am seeing the following

On hellogoodbye.today when on the Adsense dashboard, when I flip from 28 days to 90 days, there is data according to the full stats in Adsense but I'm seeing what is looking like actual data available for a millisecond then the 'No ad impressions yet' message is shown. See below. Flipping to 90 days you see a quick flash of the actual metrics

Site Kit by Google AdSense ‹ Hellogoodbye — WordPress (3)

Checking Adsense statistics, I see impressions past 28 days:
image

Sending back to Execution for adjustments as 90 days should display data when available.

@felixarntz
Copy link
Member

@felixarntz felixarntz commented Oct 23, 2020

@ryanwelcher @aaemnnosttv Let's try to find the reason for this one early on Monday. It's not a highly critical problem I think, but it appears to be a regression from this one, so it should be addressed in a timely manner.

Depending on whether the fix is simple enough, we can squeeze it into this release - otherwise let's open a follow-up issue and mark it for the 1.20.0 release.

@aaemnnosttv aaemnnosttv self-assigned this Oct 26, 2020
@aaemnnosttv
Copy link
Collaborator

@aaemnnosttv aaemnnosttv commented Oct 26, 2020

@felixarntz @ryanwelcher It has to do with a change to the isDataZeroAdSense function; will open a PR against master for this now.

@aaemnnosttv
Copy link
Collaborator

@aaemnnosttv aaemnnosttv commented Oct 26, 2020

@felixarntz The PR is opened for inclusion in the release now. The problem @cole10up found was that the component would render a zero data state if the previous range had no data.

Using Cole's data which is able to reproduce the behavior above, I can now see the 90 day range (note the relative change indicators and values are not shown due to lack of data).

image

@fhollis fhollis removed this from the Sprint 34 milestone Oct 26, 2020
@fhollis fhollis added this to the Sprint 35 milestone Oct 26, 2020
@felixarntz felixarntz assigned cole10up and unassigned felixarntz Oct 26, 2020
@cole10up
Copy link

@cole10up cole10up commented Oct 26, 2020

Retested

Installed the latest zip, activated and setup SK. Activated Adsense and confirmed the fix:
Site Kit by Google AdSense ‹ Hellogoodbye — WordPress (4)

Passed QA ✅

@cole10up cole10up removed their assignment Oct 26, 2020
@felixarntz felixarntz closed this Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: AdSense P1 Type: Enhancement
Projects
None yet
Development

No branches or pull requests

10 participants