-
Notifications
You must be signed in to change notification settings - Fork 2.7k
MM-2998 Add telemetry for product notices #6934
Conversation
* Add track event when user clicks on action button of notice
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.
LGTM but there seems to be a changed import? isn't it import {trackEvent} from 'actions/telemetry_actions.jsx'
?
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.
left a comment, but I don't think it is in the scope of the change, something to consider for the future. LGTM
@@ -186,6 +188,11 @@ export default class ProductNoticesModal extends React.PureComponent<Props, Stat | |||
return null; | |||
} | |||
|
|||
private trackClickEvent = () => { | |||
const presentNoticeInfo = this.state.noticesData[this.state.presentNoticeIndex]; | |||
trackEvent('ui', `notice_click_${presentNoticeInfo.id}`); |
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.
not to change it right now, but feels like 'ui'
should really be a constant so we use the same string throughout the code prevent typos
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.
Ya, i agree. All events strings need to be changed to constants. I think we can run a campaign on this
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.
Thank you @sudheerDev
Per our discussion QA will test telemetry for product notices after merge.
Cherry pick is scheduled. |
Error trying doing the automated Cherry picking. Please do this manually
|
@esethna @sudheerDev I added the "Docs/Needed" label as I wasn't sure if this needs docs for https://docs.mattermost.com/administration/telemetry.html. Please take a look. |
@sudheerDev can you help submit a PR as needed? |
|
Summary
Ticket Link
https://mattermost.atlassian.net/browse/MM-29998
Related Pull Requests
mattermost/mattermost-redux#1277