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

Average Position Metrics Display

Open connorhsm opened this issue 7 years ago • 4 comments

Bug Description

The Average Position Y value in the graph should be inverted, as the 1st position is considered the best position you could theoretically have.

Currently, when comparing Total clicks and or Total Impressions with Average Position, the graphs appear as if your Total Clicks and Total Impressions go down when your Average Position appears to go up. Upon analyzing the data below, you would expect the lines to have roughly followed each other.

Steps to reproduce

  1. Go to 'Site Kit > Search Console page'
  2. Click on 'Average Position, so that you are comparing Average Position with Total Clicks and or Total Impressions'
  3. See error

Screenshots

Screen Shot 2019-11-18 at 11 29 39 pm

Additional Context

  • PHP Version: 7.2
  • OS: [e.g. iOS] macOS Catalina
  • Browser [e.g. chrome, safari] Chrome
  • Plugin Version [e.g. 22] 1.0.4
  • Device: [e.g. iPhone6] MacBook Air

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

Acceptance criteria

When displaying the chronological graph of Search Console avg position values for the site, the smallest value should be at the top of the Y axis, similar to how it's displayed in Search Console:

avg-position

Implementation Brief

  • In addition to the title prop for the "Average Position" stat, set the direction prop to be -1, eg: https://github.com/google/site-kit-wp/blob/bbe420f9742495c7b834615fd5f36f09c73ffa14/assets/js/modules/search-console/dashboard/dashboard-widget.js#L136-L145
  • I noticed the charts' titles are not translated, so add translations to the chart titles (eg: https://github.com/google/site-kit-wp/blob/bbe420f9742495c7b834615fd5f36f09c73ffa14/assets/js/modules/search-console/dashboard/dashboard-widget.js#L128-L133)

Changelog entry

  • Fix Search Console average position graph to show the smallest value on top of the Y axis.

connorhsm avatar Nov 18 '19 12:11 connorhsm

This one took a fair amount of time to figure out in terms of which option to set and where; to stop the IB from being too generic I ended up implementing the solution, so the estimate on this one is quite low because most of the work for this IB is ready in #988.

tofumatt avatar Dec 18 '19 23:12 tofumatt

IB ✅

felixarntz avatar Dec 19 '19 07:12 felixarntz

Verified, y axis is inverted. Clicked through other filters, confirmed functionality.

image

Passed QA ✅

cole10up avatar Jan 07 '20 16:01 cole10up

LGTM

marrrmarrr avatar Jan 15 '20 12:01 marrrmarrr