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

Add tracking for backup storage info bar chart #23461

Merged
merged 17 commits into from
Mar 21, 2022

Conversation

manzoorwanijk
Copy link
Member

Changes proposed in this Pull Request:

Jetpack product discussion

HACK WEEK project p6TEKc-61M-p2

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

No

Testing instructions:

  • Boot up the branch and run a JT site and connect Jetpack with Free plan
  • Goto At a Glance page.
  • Ensure that you have more than 20 posts published on the site OR you can also manually change (via React Dev tools) the posts prop to more than 20 in BackupUpdare component added in Add Backup Storage info to At a Glance page #23374
  • After the BarChart is visible, confirm that you see in Network tab new tracking request with event name jetpack_wpa_aag_backup_bar_chart_view
  • Close the popup that blocks the bar chart
  • Confirm that you see in Network tab new tracking request with event name being jetpack_wpa_click, target and type being backup_bar_chart_close and dismiss respectively.

@manzoorwanijk manzoorwanijk added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Status] Needs Tracks Review Added/removed/modified a tracks event. labels Mar 16, 2022
@manzoorwanijk manzoorwanijk requested a review from a team March 16, 2022 08:55
@manzoorwanijk manzoorwanijk self-assigned this Mar 16, 2022
@github-actions github-actions bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Admin Page React-powered dashboard under the Jetpack menu labels Mar 16, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 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: April 5, 2022.
  • Scheduled code freeze: March 29, 2022.

@github-actions github-actions bot added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Mar 16, 2022
@manzoorwanijk manzoorwanijk changed the title Add tracking backup storage info bar chart Add tracking for backup storage info bar chart Mar 16, 2022
@manzoorwanijk manzoorwanijk removed the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Mar 16, 2022
@manzoorwanijk manzoorwanijk force-pushed the add/at-a-glance/backup-storage-tracking branch from ed655cc to 33e3586 Compare March 16, 2022 09:11
Copy link
Contributor

@elliottprogrammer elliottprogrammer left a comment

Choose a reason for hiding this comment

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

Tested, and the tracking events are firing correctly. The code LGTM, just a minor comment below to make sure we're naming the tracking properties properly.
Otherwise, everything LGTM! 👍

Comment on lines +27 to +33
const clickEventProps = {
comments,
plugins,
posts,
target: 'backup_bar_chart_close',
type: 'dismiss',
};
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not exactly sure about the naming properties of recordJetpackClick(), ie- { target, feature, type } and what they should represent exactly, maybe someone from Crew can verify if your target and type properties are following convention properly.

Copy link
Member Author

Choose a reason for hiding this comment

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

CC @Automattic/jetpack-crew

Copy link
Member

Choose a reason for hiding this comment

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

Crew can verify if your target and type properties are following convention properly.

This looks good to me. 👍

@manzoorwanijk manzoorwanijk force-pushed the add/at-a-glance/backup-storage-info branch from ea195c3 to de89dc2 Compare March 17, 2022 05:35
@manzoorwanijk manzoorwanijk force-pushed the add/at-a-glance/backup-storage-tracking branch from 33e3586 to 363fa0a Compare March 17, 2022 05:40
Base automatically changed from add/at-a-glance/backup-storage-info to master March 17, 2022 15:39
@manzoorwanijk manzoorwanijk force-pushed the add/at-a-glance/backup-storage-tracking branch from 363fa0a to e0a571f Compare March 17, 2022 15:43
@manzoorwanijk manzoorwanijk requested a review from a team March 17, 2022 15:45
@jeherve jeherve added the [Status] Needs Review To request a review from Crew. Label will be renamed soon. label Mar 17, 2022
@manzoorwanijk manzoorwanijk enabled auto-merge (squash) March 18, 2022 05:26
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 looks good, but seems to be triggered too often in my tests:

https://videopress.com/v/sMyXVKu3

Comment on lines +27 to +33
const clickEventProps = {
comments,
plugins,
posts,
target: 'backup_bar_chart_close',
type: 'dismiss',
};
Copy link
Member

Choose a reason for hiding this comment

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

Crew can verify if your target and type properties are following convention properly.

This looks good to me. 👍

@jeherve jeherve added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! [Feature] Tracks and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Status] Needs Tracks Review Added/removed/modified a tracks event. labels Mar 18, 2022
@manzoorwanijk
Copy link
Member Author

This looks good, but seems to be triggered too often in my tests:

I have added a fix.

It is happening because of <QueryStatsData /> rendered in <DashStats /> in "At a Glance" page. When you switch back to the tab, the query for stats data runs again, which triggers re-render.

@manzoorwanijk manzoorwanijk added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Mar 18, 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, should be good to merge!

Upon looking at that banner again, I would have 3 suggestions for improvements, in future PRs:

  • Use numberFormat to format the numbers displayed in the banner.
  • When dismissing the banner, dismiss the whole banner, including JetpackBanner
  • Remember the dismissal so the banner doesn't come back if I navigate away from that view and come back to it a minute later.

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Mar 21, 2022
@jeherve jeherve added this to the jetpack/10.8 milestone Mar 21, 2022
@manzoorwanijk manzoorwanijk merged commit 19d650b into master Mar 21, 2022
@manzoorwanijk manzoorwanijk deleted the add/at-a-glance/backup-storage-tracking branch March 21, 2022 14:14
@manzoorwanijk
Copy link
Member Author

I would have 3 suggestions for improvements, in future PRs:

Thank you. Will try to implement those suggestion in an upcoming PRs.

@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Mar 21, 2022
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 [Feature] Tracks [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants