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

IDC: Event tracking for the new screen #21900

Merged
merged 10 commits into from
Nov 30, 2021
Merged

IDC: Event tracking for the new screen #21900

merged 10 commits into from
Nov 30, 2021

Conversation

sergeymitr
Copy link
Contributor

@sergeymitr sergeymitr commented Nov 30, 2021

Extracted from #21822

Changes proposed in this Pull Request:

  • migrated event tracking functionality from the old IDC banner
  • adjusted property descriptions to the new convention
  • fixed a minor styling bug

Jetpack product discussion

p9dueE-3Mn-p2

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

New tracking events were not introduced, only migrated existing ones to the new IDC package.

Testing instructions:

  1. Rebuild the Connection Manager package: jetpack build packages/connection-ui.
Main screen
  1. Connect Jetpack, go to Jetpack Debug and activate the IDC Simulator.
  2. Go to "Jetpack Debug -> IDC Simulator", enable "IDC Simulation" and enter a "Spoof URL".
  3. Edit a post and save to make the site sync. Wait a few seconds.
  4. Go to "Tools -> Connection Manager", confirm that the RNA IDC screen appears.
  5. Open the browser's dev console, enter localStorage.debug = "dops:analytics"; to see the tracking events. Keep the console open, and activate the "Persist Log" feature.
  6. Reload the page. The console should show two events being tracked: jetpack_idc_notice_view and "notice-view" in group "jetpack-idc"
Stay in safe mode
  1. Click "Stay in Safe Mode". The page should reload, the IDC banners should disappear.
  2. The console should log two events: jetpack_idc_confirm_safe_mode and confirm-safe-mode.
  3. "Jetpack Safe Mode" button should appear in the top right corner, click it. The IDC banner should appear again.
Move your settings
  1. Click "Move your settings", the "migrated successfully" screen should appear, click "Got it". The page should reload, IDC banners should disappear.
  2. The console should log two events: jetpack_idc_migrate and "migrate" in group "jetpack-idc".
Fresh connection
  1. Go to the "IDC Simulator", disable simulation. Then disconnect Jetpack and connect again.
  2. Enable the simulation, edit a post. You might need to wait a bit.
  3. Go to Jetpack Dashboard, confirm that you see the IDC screen, and do not see the dashboard itself.
  4. Keep the IDC screen browser tab open, in another tab go to the IDC simulator and disable the simulation. With simulation enabled you won't be able to connect the site.
  5. Switch back to the IDC screen tab, click "Create a fresh connection". Confirm that you see the two events tracked in the console: jetpack_idc_start_fresh and "start-fresh" in group "jetpack-idc".
  6. Go through the connection process, confirm that you're redirected back to the Connection Manager page. IDC banners should disappear.

@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello sergeymitr! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D70779-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] IDC [Package] Connection UI This package no longer exists in the monorepo. RNA labels Nov 30, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Nov 30, 2021

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: December 7, 2021.
  • Scheduled code freeze: November 30, 2021.

Backup plugin:

  • Next scheduled release: December 7, 2021.
  • Scheduled code freeze: November 29, 2021.

@github-actions github-actions bot added [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 Nov 30, 2021
@sergeymitr sergeymitr requested a review from samiff November 30, 2021 01:41
@sergeymitr
Copy link
Contributor Author

Hi @samiff.
I extracted some code from #21822 for easier review, can you please take a look?

@github-actions github-actions bot added [Block] Tiled Gallery Admin Page React-powered dashboard under the Jetpack menu labels Nov 30, 2021
Copy link
Contributor

@samiff samiff left a comment

Choose a reason for hiding this comment

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

Nice cleanup, still tests well for me 👍

The localStorage.debug = "dops:analytics"; did work for me this time around. Chrome dev tool's default logging level doesn't include "verbose" which the events show up under.

Go to Jetpack Dashboard, confirm that you see the IDC screen, and do not see the dashboard itself.

This is a little bit different from #21822 since we aren't showing the new IDC screen on the JP Dashboard in this PR, but was able to see the jetpack_idc_start_fresh event fire okay from the Connection Manager screen.

@sergeymitr
Copy link
Contributor Author

This is a little bit different from #21822 since we aren't showing the new IDC screen on the JP Dashboard in this PR, but was able to see the jetpack_idc_start_fresh event fire okay from the Connection Manager screen.

Good call, I missed that while copying the testing instructions.
Thanks for taking a look!

@sergeymitr sergeymitr merged commit 09b753b into master Nov 30, 2021
@sergeymitr sergeymitr deleted the add/idc-tracking branch November 30, 2021 22:29
@github-actions
Copy link
Contributor

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

Thank you!

@sergeymitr
Copy link
Contributor Author

r235862-wpcom

davidlonjon added a commit that referenced this pull request Dec 2, 2021
* master:
  Added a custom composer installer to use a separate vendor folder. (#21877)
  Masterbar: rewrite tracks-events.js without jQuery (#21907)
  pre-commit: Run `eslint --fix` like we do `phpcbf` (#21923)
  Hide licenses activation route when user account not linked. (#21919)
  Beta: Handle exception when no Internet connection (#21915)
  Update wordpress monorepo (#21918)
  Pin dependency automattic/wordbless to 0.3.1 (#21920)
  Use new GitHub secret to manage pushing to Project Boards (#21838)
  Backup: provide additional disconnect info in backup plugin (#21421)
  IDC: Event tracking for the new screen (#21900)
  Releases: add testing list for Jetpack 10.4 (#21909)
  Jetpack 10.5-a.0 Cycle Start (#21912)
  Jetpack 10.4: Changelog (#21908)
  Add/contextualized jetpack connection (#21815)
  Fix masterbar not being displayed entirely for resolutions of under 660px. (#21871)
  Handle the intermittent occurrence of null in `columnWidths[ rowIndex ]` array  in TiledGallery (#21892)
  Add to My Plan's header section a small licensing-related piece of copy (#21899)
  Sharing: ask search engines to not index pages with query string. (#21843)
  PR Template: Indicate use of milestone (#21898)
  Likes: add some extra checks to queuehandler.js (#21896)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Page React-powered dashboard under the Jetpack menu [Block] Tiled Gallery [JS Package] IDC [Package] Connection UI This package no longer exists in the monorepo. [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 Touches WP.com Files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants