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

Average Position Metrics Display #874

Closed
connorhsm opened this issue Nov 18, 2019 · 4 comments
Closed

Average Position Metrics Display #874

connorhsm opened this issue Nov 18, 2019 · 4 comments
Labels
P1 Medium priority Type: Bug Something isn't working
Milestone

Comments

@connorhsm
Copy link

connorhsm commented Nov 18, 2019

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:
    const otherSettings = {};
    // The third index refers to the "Average Position" stat.
    // We need to reverse the y-axis for this stat, see:
    // https://github.com/google/site-kit-wp/issues/874
    if ( stat === 3 ) {
    otherSettings.direction = -1;
    }
    return { title: vAxesMap[ stat ], ...otherSettings };
    } );
  • I noticed the charts' titles are not translated, so add translations to the chart titles (eg:
    const vAxesMap = {
    0: __( 'Clicks', 'google-site-kit' ),
    1: __( 'Impressions', 'google-site-kit' ),
    2: __( 'Average CTR', 'google-site-kit' ),
    3: __( 'Average Position', 'google-site-kit' ),
    };
    )

Changelog entry

  • Fix Search Console average position graph to show the smallest value on top of the Y axis.
@marrrmarrr marrrmarrr added Type: Enhancement Improvement of an existing feature P1 Medium priority labels Nov 20, 2019
@tofumatt tofumatt self-assigned this Dec 18, 2019
tofumatt added a commit that referenced this issue Dec 18, 2019
Reverse the y-axis direction for Average Position in Search Console
stats. See: #874.
tofumatt added a commit that referenced this issue Dec 18, 2019
Reverse the y-axis direction for Average Position in Search Console
stats. See: #874.
@tofumatt tofumatt assigned felixarntz and unassigned tofumatt Dec 18, 2019
@tofumatt
Copy link
Collaborator

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.

@felixarntz
Copy link
Member

IB ✅

@felixarntz felixarntz assigned tofumatt and unassigned felixarntz Dec 19, 2019
@tofumatt tofumatt assigned felixarntz and unassigned tofumatt Dec 19, 2019
@felixarntz felixarntz removed their assignment Dec 30, 2019
@felixarntz felixarntz added this to the 1.1.5 milestone Dec 30, 2019
@cole10up cole10up self-assigned this Jan 6, 2020
@cole10up
Copy link

cole10up commented Jan 7, 2020

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

image

Passed QA ✅

@cole10up cole10up removed their assignment Jan 7, 2020
@marrrmarrr
Copy link
Collaborator

LGTM

@felixarntz felixarntz added Type: Bug Something isn't working and removed Type: Enhancement Improvement of an existing feature labels Jan 16, 2020
@ThierryA ThierryA modified the milestones: 1.2.0, Sprint 14 Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Medium priority Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants