-
Notifications
You must be signed in to change notification settings - Fork 712
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
Added mixpanel tracking for some basic events #2462
Conversation
07606f1
to
7e5eca7
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.
LGTM w/ small changes!
// If the search query is parsable, pin it when ENTER key is hit. | ||
if (ev.keyCode === ENTER_KEY_CODE && parseQuery(this.props.searchQuery)) { | ||
trackMixpanelEvent('scope.search.query.pin', { | ||
query: this.props.searchQuery, |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
handleFocus() { | ||
this.props.focusSearch(); | ||
} | ||
|
||
doSearch(value) { | ||
if (value !== '') { | ||
trackMixpanelEvent('scope.search.query.change', { | ||
query: value, |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
7e5eca7
to
9644b97
Compare
78b7728
to
8eaf48a
Compare
@foot I addressed your comment and also added some tracking for All these changes were rather small so I'll merge this PR after the tests pass without your second look at it. |
Addresses #2460 by making use of Service UI's configured
window.mixpanel
variable directly.Tracked events
scope.layout.refresh.click
scope.layout.selector.click
scope.layout.selector.keypress
scope.metric.selector.pin.click
scope.metric.selector.pin.next.keypress
scope.metric.selector.pin.previous.keypress
scope.metric.selector.unpin.click
scope.metric.selector.unpin.keypress
scope.node.click
scope.node.relative.click
scope.search.query.change
scope.search.query.pin
scope.topology.option.click
scope.topology.selector.click
Most of them have the active topology and view mode (layout) props attached to them to have some context of where the events are coming from. I checked it on the mixpanel dashboard and it seems to work nicely!
Other changes
hitEnter
action withpinSearch
which gets called directly from thesearch.js
, since we only need to handle the ENTER key press from the search bar.