-
Notifications
You must be signed in to change notification settings - Fork 799
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
Conversation
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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. Jetpack plugin:
Backup plugin:
|
There was a problem hiding this 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.
projects/js-packages/connection/components/disconnect-dialog/test/step-disconnect.jsx
Outdated
Show resolved
Hide resolved
projects/js-packages/connection/components/disconnect-dialog/index.jsx
Outdated
Show resolved
Hide resolved
projects/js-packages/connection/components/disconnect-dialog/steps/step-disconnect.jsx
Outdated
Show resolved
Hide resolved
- rename stay connected handler - move all click tracking code to step-disconnect
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 🤔 |
projects/js-packages/connection/components/disconnect-dialog/steps/step-disconnect.jsx
Outdated
Show resolved
Hide resolved
projects/js-packages/connection/components/disconnect-dialog/index.jsx
Outdated
Show resolved
Hide resolved
projects/js-packages/connection/components/disconnect-dialog/steps/step-disconnect.jsx
Outdated
Show resolved
Hide resolved
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
Caution: This PR has changes that must be merged to WordPress.com |
There was a problem hiding this 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.
projects/js-packages/connection/components/disconnect-dialog/test/step-disconnect.jsx
Show resolved
Hide resolved
There was a problem hiding this 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.
Great news! One last step: head over to your WordPress.com diff, D73889-code, and commit it. Thank you! |
r239287-wpcom |
Changes proposed in this Pull Request:
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.Jetpack connection
link and check you see thejetpack_disconnect_dialog_click_learn_about
eventcontact Jetpack support
link and check you see thejetpack_disconnect_dialog_click_support
eventStay Connected
button and check the modal still closes and you see thejetpack_disconnect_dialog_click_stay_connected
eventDisconnect
button and check you still disconnect and see thejetpack_disconnect_dialog_click_disconnect
eventRepeat the above from the -> Plugins : Jetpack :
Disconnect and Deactivate
- the events are the same but thecontext
of the tracking should beplugins
rather thanjetpack
For reference, the links and buttons are illustrated here:
Unit Tests
Unit Tests have been updated and can be checked by running
pnpm t
from theprojects/js-packages/connection/
folder.