Skip to content

Premium Analytics: normalize secondary Stats reports - #49780

Closed
kangzj wants to merge 1 commit into
trunkfrom
split/stats-secondary-normalizers
Closed

Premium Analytics: normalize secondary Stats reports#49780
kangzj wants to merge 1 commit into
trunkfrom
split/stats-secondary-normalizers

Conversation

@kangzj

@kangzj kangzj commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #

Proposed changes

  • Add split secondary Stats normalizers for devices, archives, publicize, followers, tags, comments, and comment followers.
  • Add shared generic-list helpers and endpoint-specific fixture coverage for summarized and raw response shapes.
  • Incorporate review/browser feedback: support summarized archives, align video-play summary fixtures with the live plays shape, avoid stringifying object labels as [object Object], and leave UTM unnormalized because it was inspected only for request behavior in this stack.

Related product discussion/links

Does this pull request change what data or activity we track or use?

No. This only normalizes existing Stats API response shapes.

Testing instructions

  • Run pnpm --dir projects/packages/premium-analytics test --runInBand.
  • Run pnpm --dir projects/packages/premium-analytics typecheck.
  • Run pnpm --dir projects/packages/premium-analytics build.
  • Browser verification for the stack: dashboard and detail-page requests were inspected while logged in. Summarized secondary endpoints use summarize=1; detail and period shortcut requests also continue to use summarize=1, usually with max=0. Authenticated raw replays without summarize=1 confirmed endpoint-specific days buckets such as files, plays, search_terms, clicks, groups, postviews, and authors, plus scalar totals where present.
  • UTM was inspected for request behavior only and is intentionally not normalized by this PR.

@kangzj kangzj added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. [Status] Needs Review This PR is ready for review. [Package] Premium Analytics labels Jun 19, 2026
@kangzj kangzj self-assigned this Jun 19, 2026
@jp-launch-control

jp-launch-control Bot commented Jun 19, 2026

Copy link
Copy Markdown

Code Coverage Summary

This PR did not change code coverage!

That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷

Full summary · PHP report

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@kangzj

This comment has been minimized.

@claude

This comment has been minimized.

@kangzj

This comment has been minimized.

This comment has been minimized.

@kangzj kangzj added [Status] Needs Team Review Obsolete. Use Needs Review instead. and removed [Status] Needs Review This PR is ready for review. labels Jun 19, 2026
@kangzj
kangzj force-pushed the split/stats-time-series-normalizers branch from a8bab25 to 5893252 Compare June 19, 2026 04:46
@kangzj
kangzj force-pushed the split/stats-secondary-normalizers branch from ee4f337 to 53cd069 Compare June 19, 2026 04:47
@kangzj
kangzj force-pushed the split/stats-time-series-normalizers branch from 5893252 to 48d0ccd Compare June 19, 2026 04:49
@kangzj
kangzj force-pushed the split/stats-secondary-normalizers branch 2 times, most recently from 372f809 to faec893 Compare June 19, 2026 04:51
@kangzj

This comment has been minimized.

@kangzj

This comment has been minimized.

@claude

This comment has been minimized.

This comment has been minimized.

@kangzj
kangzj force-pushed the split/stats-time-series-normalizers branch from a39be3f to bf4d0bb Compare June 19, 2026 05:10
@kangzj
kangzj force-pushed the split/stats-secondary-normalizers branch from eadd4fd to 5a5d76f Compare June 19, 2026 05:10
@kangzj kangzj closed this Jun 24, 2026
@github-actions github-actions Bot removed the [Status] Needs Team Review Obsolete. Use Needs Review instead. label Jun 24, 2026
This was referenced Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. [Package] Premium Analytics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants