Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stepper Tracking: Remove checks that prevent step start tracking #96742

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

escapemanuele
Copy link
Contributor

@escapemanuele escapemanuele commented Nov 25, 2024

Related to #96681

Proposed Changes

We relax the conditions further for recording the signup_step_start event:

  • When a user is "reentering the step" after a completed signup flow, we previously did not record the step start event in the useStepRouteTracking hook. We now record it and pass additional props to distinguish the event:
    • is_reentering_step_after_signup_complete
    • signup_complete_flow_name
    • signup_complete_step_name

This PR follows from previous work (#94817) to relax the conditions further for recording the step start event. We want to record this event, along with "page view", unconditionally on accessing the step routes (as the only tracking mechanism we have for these routes). See discussions in #94817 and associated issue for additional reasoning.

Why are these changes being made?

  • Fix inconsistencies in Tracking. This may have led to inconsistencies observed from comprising Start &b Stepper onboarding flows.
  • We ensure routes are being tracked when accessed, and contextualize the event instead (instead of not recording). See discussions in Stepper: Track step-route unconditionally - logged-out/empty #94817 and associated issue for additional reasoning.

TODO

  • Investigate the case of hasRequestedSelectedSite

Testing Instructions

  • TBD

@escapemanuele escapemanuele requested a review from a team as a code owner November 25, 2024 17:49
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 25, 2024
@escapemanuele escapemanuele self-assigned this Nov 25, 2024
@matticbot
Copy link
Contributor

matticbot commented Nov 25, 2024

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~48 bytes added 📈 [gzipped])

name           parsed_size           gzip_size
entry-stepper       +141 B  (+0.0%)      +48 B  (+0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@chriskmnds
Copy link
Contributor

chriskmnds commented Nov 26, 2024

@escapemanuele Made some updates to record is_reentering_step_after_signup_complete , signup_complete_flow_name, signup_complete_step_name, which should address the issue you mentioned in Slack: p1732568456069069/1732529755.704809-slack-C073776NJ66

Anyway the PR uncovers problems: we may need a better way to handle coming back from checkout to domains.

If you're returning from checkout, this code sends you to Plans (mimicking what happens in Start).

The problem is that it's impossible to go from Plans to Domains in this case, and before it was working only because the checks in useStepRouteTracking were clearing the session storage (getSignupCompleteFlowNameAndClear();)

If I understood the issue correctly. Do you mind checking again?

Let's also try and investigate the other check in the hook in case anything fishy there:

	if ( ! hasRequestedSelectedSite ) {
		return;
	}

@chriskmnds chriskmnds force-pushed the stepper-no-reentering-check branch from cd7a775 to 7e7718a Compare November 26, 2024 09:43
@matticbot
Copy link
Contributor

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

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

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug stepper-no-reentering-check on your sandbox.

@chriskmnds chriskmnds changed the title StepperTracking: Remove checks that prevent step start tracking Stepper Tracking: Remove checks that prevent step start tracking Nov 26, 2024
@escapemanuele
Copy link
Contributor Author

Giving a second thought here, I'm now not sure that isReEnteringStep is the problem here, since I found it difficult to see signupCompleteStepName as domains (thus preventing Domains step to be recorded). Anyways, I find it ok to relax the conditions.

@escapemanuele escapemanuele requested a review from a team November 26, 2024 16:33
@escapemanuele escapemanuele merged commit 9ae61cd into trunk Nov 27, 2024
11 checks passed
@escapemanuele escapemanuele deleted the stepper-no-reentering-check branch November 27, 2024 13:30
@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 Nov 27, 2024
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.

3 participants