Skip to content

Premium Analytics: show What's new in Stats without its feature flag - #55462

Open
retrofox wants to merge 3 commits into
trunkfrom
update/announcements-22-stats-whats-new
Open

retrofox wants to merge 3 commits into
trunkfrom
update/announcements-22-stats-whats-new

Conversation

@retrofox

Copy link
Copy Markdown
Contributor

Proposed changes

What's new is on in Stats for every site. Its feature flag is gone, and the dashboard publishes no announcement yet.

Closes WOOA7S-2478

[Screenshot: the What's new card in Stats > Settings]

No flag

jetpack-stats-whats-new is removed. The dashboard mounts the surface on every page load, once its onboarding is done, and Settings always offers the switch that turns the teaser off.

The registrant loses FLAG, is_enabled() and add_script_data(), and the script data loses whats_new_enabled.

The channel is stats

The channel of the dashboard takes the slug of the product: stats on every page, and stats/<section> on one. It was premium-analytics.

With the flag gone, the name is what other code publishes to. So it changes now.

No announcement yet

"Arrange your tabs" is no longer registered, so nobody sees a teaser after this change. It stays as the example entry in docs/whats-new-channels.md.

Adding an announcement is adding an entry to get_announcements(). The rules of the dashboard still apply to it, and a fixture tests them: whoever can read the dashboard sees it, and a user who registered after its date does not.

Related product discussion/links

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

It adds no event. The five Tracks events of #55341 were recorded only with the flag on, and are now recorded for every user of the new Stats.

Testing instructions

Build

jp build packages/premium-analytics --deps

Settings

Open Stats, and go to Settings from the Stats options menu. No flag is needed. The "What's new" card shows, with its switch on.

Turn the switch off and reload. It stays off.

The dashboard

Open Stats. No teaser shows, as there is no announcement.

In the Network tab, the page reads wpcom/v2/jetpack-announcements and gets an empty list.

With an announcement

Paste the entry of docs/whats-new-channels.md into get_announcements(), in projects/packages/premium-analytics/src/class-dashboard-announcements.php, and reload Stats.

The teaser "Arrange your tabs" shows on the dashboard, and not in Settings. A user registered after November 12 does not see it.

Tests

jp test php packages/premium-analytics
jp test js packages/premium-analytics

@retrofox
retrofox requested a review from a team as a code owner November 25, 2026 16:39
@retrofox retrofox added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. labels Nov 25, 2026
@retrofox retrofox self-assigned this Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the update/announcements-22-stats-whats-new branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/announcements-22-stats-whats-new

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions

github-actions Bot commented Nov 25, 2026 •

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!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: December 8, 2026
    • Code freeze: December 7, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Premium Analytics plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Stats Data plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

No summary data is available for parent commit ceff496, 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 ceff496 is available.

Full summary · PHP report · JS report

@dognose24 dognose24 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The flag and its script data are gone cleanly, and the channel is stats on both the PHP and the client side.

One question, not blocking. With no announcement registered, every dashboard load still fetches the announcements chunk and asks the endpoint for an empty list, and Settings shows a switch for a teaser nobody can see yet. Is a first announcement planned before the December 8 release?

Heads up that this and #55372 both touch neighbouring lines in jetpack-script-data.d.ts, so whichever lands second gets a small conflict there.

Tested on a Jurassic Ninja site running this branch at 27ec23f, with no flag set.

  • Settings shows the What's new card with the switch on.
  • The dashboard shows no teaser, and jetpack-announcements returns an empty list.
  • With a test announcement registered on stats/main through the jetpack_register_announcements action, the teaser shows on the dashboard.

All as described. Here is the Settings card.

The What's new card at the foot of Stats Settings, with its switch on

@retrofox

Copy link
Copy Markdown
Contributor Author

One question, not blocking. With no announcement registered, every dashboard load still fetches the announcements chunk and asks the endpoint for an empty list, and Settings shows a switch for a teaser nobody can see yet. Is a first announcement planned before the December 8 release?

Fair question, let's discuss with folks

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Package] Premium Analytics [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Premium Analytics [Plugin] Stats Data [Status] Needs Review This PR is ready for review. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants