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

Track user clicks on Links/Buttons in disconnect modal footer #22467

Merged
merged 10 commits into from
Jan 31, 2022

Conversation

jim-coffey
Copy link
Contributor

@jim-coffey jim-coffey commented Jan 24, 2022

Changes proposed in this Pull Request:

  • user should see no difference
  • when clicking any link or button in the footer of the disconnect dialog - an event should be recorded so we can see how users are interacting with the modal options (see test plan for details)

Jetpack product discussion

n/a

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

We are tracking some more clicks but no major change to how or what we track.

Testing instructions:

You can see if tracking events are being triggered by looking for the tracking pixels in the Network and checking query parameters - filter network traffic by t.gif. Or enabling logging in the browser console, as detailed here PCYsg-nSS-p2. Or visit the internal live tracker website.

  • with Jetpack development running locally
  • open /wp-admin
  • navigate to -> Jetpack -> Dashboard
  • click 'Manage Site Connection'
  • click the Jetpack connection link and check you see the jetpack_disconnect_dialog_click_learn_about event
  • click the contact Jetpack support link and check you see the jetpack_disconnect_dialog_click_support event
  • click the Stay Connected button and check the modal still closes and you see the jetpack_disconnect_dialog_click_stay_connected event
  • reopen the modal, and click the Disconnect button and check you still disconnect and see the jetpack_disconnect_dialog_click_disconnect event

Repeat the above from the -> Plugins : Jetpack : Disconnect and Deactivate - the events are the same but the context of the tracking should be plugins rather than jetpack

For reference, the links and buttons are illustrated here:
disconnect_modal

Unit Tests

Unit Tests have been updated and can be checked by running pnpm t from the projects/js-packages/connection/ folder.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 24, 2022

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.
  • ⚠️ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team 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 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: February 1, 2022.
  • Scheduled code freeze: January 24, 2022.

Backup plugin:

  • Next scheduled release: February 1, 2022.
  • Scheduled code freeze: January 24, 2022.

@github-actions github-actions bot added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Jan 24, 2022
@jim-coffey jim-coffey added [Status] Needs Privacy Updates Our support docs will need to be updated to take this change into account [Status] Needs Team Review labels Jan 24, 2022
Copy link
Contributor

@jboland88 jboland88 left a comment

Choose a reason for hiding this comment

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

Looks good overall, added a few comments inline

Some small notes on the test plan:

You can see if tracking events are being triggered by looking for the tracking pixels in the Network and checking query parameters

Some more instruction on this could be helpful on this point, is there something to filter by in the Network panel that would show the requests that we are looking for?

A screenshot of this modal from a testing site would be a nice add to the test plan to show which links are being tested. I think the steps are descriptive for what to click/ observe, but a visual would help confirm the tester is looking at the right thing.

Since JS unit tests are being added/ modified, we'll want to be sure to include an instruction to confirm the tests are passing as part of the test plan. IIRC, to run tests for this package, you can run pnpm test from within the package directory.

- rename stay connected handler
- move all click tracking code to step-disconnect
@travisw
Copy link

travisw commented Jan 26, 2022

It all works great. Nice work, Jim. I left a few inline questions and comments.

@jim-coffey
Copy link
Contributor Author

It all works great. Nice work, Jim. I left a few inline questions and comments.

Hey @travisw - I'm probably missing something - but I can't see any comments from you 🤔

@travisw
Copy link

travisw commented Jan 26, 2022

It all works great. Nice work, Jim. I left a few inline questions and comments.

Hey @travisw - I'm probably missing something - but I can't see any comments from you 🤔

Sorry Jim! I failed to click submit – just did that now.

- fix tests to loop and be less brittle
- stop constructing event names programmatically
- some formatting
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello jim-coffey! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D73889-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@github-actions github-actions bot added [JS Package] Partner Coupon [Package] Connection UI This package no longer exists in the monorepo. [Package] My Jetpack [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Jan 27, 2022
jboland88
jboland88 previously approved these changes Jan 27, 2022
Copy link
Contributor

@jboland88 jboland88 left a comment

Choose a reason for hiding this comment

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

I think this looks good and tests well.
Added one suggestion around the unit tests, but not considering that a blocker.

@jim-coffey jim-coffey requested a review from a team January 28, 2022 11:33
@jim-coffey jim-coffey added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] Needs Team Review labels Jan 28, 2022
@jeherve jeherve added this to the jetpack/10.7 milestone Jan 28, 2022
jeherve
jeherve previously approved these changes Jan 28, 2022
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

This tests well for me. 🚢
The js tests are failing at the moment, but it may be a false alert. I've relaunched the tests just now.

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Jan 28, 2022
@jim-coffey jim-coffey added the [Status] Needs Review To request a review from Crew. Label will be renamed soon. label Jan 31, 2022
@samiff samiff self-requested a review January 31, 2022 20:00
@samiff samiff merged commit 476b02f into master Jan 31, 2022
@samiff samiff deleted the add/disconnect-modal-click-events branch January 31, 2022 20:10
@samiff samiff removed the [Status] Needs Review To request a review from Crew. Label will be renamed soon. label Jan 31, 2022
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Jan 31, 2022
@github-actions
Copy link
Contributor

Great news! One last step: head over to your WordPress.com diff, D73889-code, and commit it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

@samiff
Copy link
Contributor

samiff commented Jan 31, 2022

r239287-wpcom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[JS Package] Connection [JS Package] Partner Coupon [Package] Connection UI This package no longer exists in the monorepo. [Package] My Jetpack [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ RNA [Status] Needs Privacy Updates Our support docs will need to be updated to take this change into account Touches WP.com Files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants