Skip to content

Conversation

katinthehatsite
Copy link
Contributor

@katinthehatsite katinthehatsite commented Sep 4, 2025

Part of DOTCOM-14324

Proposed Changes

This PR adds track events for the staging sites for when they are created. They are also available in the interim dashboard.

Why are these changes being made?

The new dashboard is missing these two track events.

Testing Instructions

  • Pull the changes from this branch
  • Open Calypso and then run localStorage.setItem( 'debug', 'calypso:analytics*' ); in the browser console. It might be necessary to reload the page for it to pick up the new localStorage item.
  • Ensure that you have an Atomic site
  • Navigate to /v2/sites/{yourAtomicSite}
  • Use Add staging site button in from the environment switcher
  • When you click on the button to add a staging site, you should see this event recorded:
Screenshot 2025-09-04 at 3 01 48 PM

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@katinthehatsite katinthehatsite self-assigned this Sep 4, 2025
@katinthehatsite katinthehatsite requested a review from a team as a code owner September 4, 2025 09:08
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Sep 4, 2025
Copy link

github-actions bot commented Sep 4, 2025

@katinthehatsite katinthehatsite marked this pull request as draft September 4, 2025 09:09
@katinthehatsite katinthehatsite requested a review from a team September 4, 2025 13:02
@katinthehatsite katinthehatsite marked this pull request as ready for review September 4, 2025 13:02
@matticbot
Copy link
Contributor

matticbot commented Sep 4, 2025

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • help-center

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/add-track-events-for-adding-staging-site-new-dashboard on your sandbox.

Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

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

Looks great! The event gets tracked correctly:

Markup on 2025-09-04 at 16:57:18

Copy link
Contributor

@gcsecsey gcsecsey left a comment

Choose a reason for hiding this comment

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

LGTM and works great, I can see the event firing. 👍

Image

@katinthehatsite katinthehatsite merged commit 3af7660 into trunk Sep 5, 2025
12 checks passed
@katinthehatsite katinthehatsite deleted the fix/add-track-events-for-adding-staging-site-new-dashboard branch September 5, 2025 07:42
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants