Page MenuHomePhabricator

"Pageview counts for a given category" not offering "deep" metrics
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
When I add "deep" to "category-scope", I get:

{

"detail": "The date(s) you used are valid, but we either do not have data for those date(s), or the category you asked for is not loaded yet. Please check documentation for more information",
"method": "get",
"status": 404,
"title": "Not Found",
"type": "about:blank",
"uri": "/metrics/commons-analytics/pageviews-per-category-monthly/Files_from_the_Biodiversity_Heritage_Library_in_South_America/deep/all-wikis/20241101/20241130"

}

  • However, if I set "category-scope" to "shallow" it works. However, this way, as far as I understand, I don't get the complete metrics.

What should have happened instead?:

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

@GFontenelle_WMF The deep metrics are only available for the primary categories (the ones in the allow-list).
This restriction is unfortunately necessary. The size of the data would be too big if we gathered those metrics for all non-primary categories.
I imagine the categories you mention are not primary?

@GFontenelle_WMF The deep metrics are only available for the primary categories (the ones in the allow-list).
This restriction is unfortunately necessary. The size of the data would be too big if we gathered those metrics for all non-primary categories.
I imagine the categories you mention are not primary?

The UX on this is not great, in this case. The category-metrics-snapshot endpoint gives a response for these types of categories, just with 0 for all the deep data fields, which would lead to erroneous conclusions by the user, if I am parsing the data and expecting that number to be accurate, I shouldn't have to guess if a 0 means actually 0 or just that data wasn't generated for that. These fields should perhaps be suppressed or empty values, and better error handling for other endpoints.

Hi, @mforns. Thanks! That's correct, they both are not primary categories. I guess the only way to get this data is to add them as primary to the allow-list, correct? I will add them to the list then, as these are important metrics for WMF's annual planning and BHL. I was talking to @Dominicbm too and he might do the same with some of his categories. Thanks for the comment too, @Dominicbm!

I guess the only way to get this data is to add them as primary to the allow-list, correct?

Yes!