-
Notifications
You must be signed in to change notification settings - Fork 794
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
Add tracking for backup storage info bar chart #23461
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:
|
ed655cc
to
33e3586
Compare
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.
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! 👍
const clickEventProps = { | ||
comments, | ||
plugins, | ||
posts, | ||
target: 'backup_bar_chart_close', | ||
type: 'dismiss', | ||
}; |
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'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.
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.
CC @Automattic/jetpack-crew
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.
Crew can verify if your target and type properties are following convention properly.
This looks good to me. 👍
ea195c3
to
de89dc2
Compare
33e3586
to
363fa0a
Compare
[not verified] Create BackupUpgrade component [not verified] Wire everything up [not verified] Create add-at-a-glance-backup-storage-info [not verified] i18n for labels
363fa0a
to
e0a571f
Compare
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 looks good, but seems to be triggered too often in my tests:
const clickEventProps = { | ||
comments, | ||
plugins, | ||
posts, | ||
target: 'backup_bar_chart_close', | ||
type: 'dismiss', | ||
}; |
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.
Crew can verify if your target and type properties are following convention properly.
This looks good to me. 👍
I have added a fix. It is happening because of |
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, 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.
Thank you. Will try to implement those suggestion in an upcoming PRs. |
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:
posts
prop to more than 20 inBackupUpdare
component added in Add Backup Storage info to At a Glance page #23374jetpack_wpa_aag_backup_bar_chart_view
jetpack_wpa_click
,target
andtype
beingbackup_bar_chart_close
anddismiss
respectively.