Tracks: Fix double wcadmin_ prefix. (https://github.com/woocommerce/woocommerce-admin/pull/2532)
* Tracks: Fix double wcadmin_ prefix. * Update comment * underscore dangit
This commit is contained in:
parent
272fad59fb
commit
54ff76e178
|
@ -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,
|
||||
|
|
|
@ -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 ||
|
||||
|
|
Loading…
Reference in New Issue