wordpress-mobile / WordPress-iOS

WordPress for iOS - Official repository
http://ios.wordpress.org/
GNU General Public License v2.0
3.69k stars 1.12k forks source link

[iOS] Stats: This year's stats are not consistent between mobile and web as different API endpoints return different yearly data #19356

Closed staskus closed 7 months ago

staskus commented 2 years ago

Yearly statistics of views, visitors, likes, and comments match Adnroid but don't match the Web.

image

Expected behavior

All the platforms have the same numbers.

Steps to reproduce the behavior

  1. Open Jetpack app with statsRevamp feature flag enabled
  2. Open Stats tab
  3. Make sure "This year" card is added
  4. Compare year statistic with the Web
sla8c commented 1 year ago

@staskus I found the issue for this - web is inconsistent with itself when reporting Years numbers.

On the web clicking the tab Traffic is the equivalent of our StatsPeriodStore api calls and uses endpoint /stats/visits/

And it matches the app currently for PeriodStats Years tab image

However on the web clicking tab Insights makes a call to the /stats/insights/ endpoint which is also what we do in app and it matches

image

I would summarise as follows:

Possible solutions are:

image

cc @irfano @ravishanker for heads up re: Android

staskus commented 1 year ago

@sla8c, thanks for the research. It gives much more insight! 👍

we are in sync with web so we should prob see with them on what should be the intended behaviour and action that if the web team can't action / doesn't have a strong opinion then I think we should the "View more" button at the bottom of the This Year card so the user can't navigate there and it would reduce confusion. However this should probably go through design review?

I agree. I'll try to get in touch with web folks about these questions.

staskus commented 1 year ago

I am changing the priority due to the discovery that our numbers do match the Web but only the parts that are using the same API endpoint.

No clear resolution plan for now.

staskus commented 7 months ago

This is not a client-side issue https://github.com/wordpress-mobile/WordPress-Android/issues/17213#issuecomment-2024936531