* Tracks: Fix double wcadmin_ prefix.

* Update comment

* underscore dangit
This commit is contained in:
Timmy Crawford 2019-06-27 15:56:39 -07:00 committed by GitHub
parent 272fad59fb
commit 54ff76e178
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ class ActivityPanel extends Component {
// If a panel is being opened, or if an existing panel is already open and a different one is being opened, record a track.
if ( ! isPanelOpen || tabName !== currentTab ) {
recordEvent( 'wcadmin_activity_panel_open', { tab: tabName } );
recordEvent( 'activity_panel_open', { tab: tabName } );
}
// The WordPress Notices tab is handled differently, since they are displayed inline, so the panel should be closed,

View File

@ -12,12 +12,12 @@ const tracksDebug = debug( 'wc-admin:tracks' );
/**
* Record an event to Tracks
*
* @param {String} eventName The name of the event to record, always prefixed with wca_
* @param {String} eventName The name of the event to record, always prefixed with wc_admin_
* @param {Object} eventProperties event properties to include in the event
*/
export function recordEvent( eventName, eventProperties ) {
tracksDebug( 'recordevent %s %o', eventName, eventProperties );
tracksDebug( 'recordevent %s %o', 'wc_admin_' + eventName, eventProperties );
if (
! window.wcTracks ||