Skip to content

Premium Analytics: add Stats app hooks - #49782

Closed
kangzj wants to merge 1 commit into
split/stats-remaining-hooksfrom
split/stats-app-hooks
Closed

Premium Analytics: add Stats app hooks#49782
kangzj wants to merge 1 commit into
split/stats-remaining-hooksfrom
split/stats-app-hooks

Conversation

@kangzj

@kangzj kangzj commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #

Proposed changes

  • Add split Stats app query factories and hooks for app/admin resources: referrers spam, site never-published state, plan usage, dashboard modules, dashboard module settings, purchases, notices, and commercial classification mutation.
  • Keep app/admin resources in the stats-app query-key namespace, separate from normalized report hooks.
  • Incorporate earlier review feedback: remove the unused app-query enabled knob, re-export StatsAppNoticeMutationParams from the hooks layer, explain the cross-namespace referrers invalidation, document that notices use the local plugin REST route, and invalidate plan usage after commercial-classification changes.

Related product discussion/links

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

No. This adds hooks for existing app/admin resources and mutations.

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: the live Stats dashboard was inspected while logged in to validate request behavior for dashboard cards, detail pages, period shortcuts, summarized requests, and raw authenticated replays without summarize=1.

@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
@kangzj

This comment has been minimized.

@claude

This comment has been minimized.

@kangzj

This comment has been minimized.

@jp-launch-control

jp-launch-control Bot commented Jun 19, 2026

Copy link
Copy Markdown

Code Coverage Summary

No summary data is available for parent commit 34c4485, so cannot calculate coverage changes. 😴

If that commit is a feature branch rather than a trunk commit, this is expected. Otherwise, this should be updated once coverage for 34c4485 is available.

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!

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-remaining-hooks branch from 096eb5d to 9d0d865 Compare June 19, 2026 04:47
@kangzj
kangzj force-pushed the split/stats-app-hooks branch from ad95fcb to 4634743 Compare June 19, 2026 04:47
@kangzj
kangzj force-pushed the split/stats-remaining-hooks branch from 9d0d865 to 8ec4bfe Compare June 19, 2026 04:49
@kangzj
kangzj force-pushed the split/stats-app-hooks branch from 4634743 to cb83b49 Compare June 19, 2026 04:49
@kangzj
kangzj force-pushed the split/stats-remaining-hooks branch from 8ec4bfe to 92ce3f8 Compare June 19, 2026 04:51
@kangzj
kangzj force-pushed the split/stats-app-hooks branch from cb83b49 to 7f91f75 Compare June 19, 2026 04:51
@kangzj
kangzj force-pushed the split/stats-remaining-hooks branch from 92ce3f8 to eadd4fd Compare June 19, 2026 04:52
@kangzj kangzj closed this Jun 19, 2026
@kangzj
kangzj force-pushed the split/stats-app-hooks branch from 7f91f75 to eadd4fd Compare June 19, 2026 04:52
@kangzj

This comment has been minimized.

@kangzj

This comment has been minimized.

@claude

This comment has been minimized.

@github-actions github-actions Bot removed the [Status] Needs Team Review Obsolete. Use Needs Review instead. label Jun 19, 2026
@kangzj kangzj reopened this Jun 19, 2026
@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