Fix eventPrefix for two column task list
This commit is contained in:
parent
542f7ef918
commit
1acbcd64c5
|
@ -46,12 +46,14 @@ export const TaskList: React.FC< TaskListProps > = ( {
|
|||
query,
|
||||
id,
|
||||
eventName,
|
||||
eventPrefix,
|
||||
tasks,
|
||||
twoColumns,
|
||||
keepCompletedTaskList,
|
||||
isComplete,
|
||||
displayProgressHeader,
|
||||
} ) => {
|
||||
const listEventPrefix = eventName ? eventName + '_' : eventPrefix;
|
||||
const { createNotice } = useDispatch( 'core/notices' );
|
||||
const { updateOptions, dismissTask, undoDismissTask } = useDispatch(
|
||||
OPTIONS_STORE_NAME
|
||||
|
@ -80,7 +82,7 @@ export const TaskList: React.FC< TaskListProps > = ( {
|
|||
return;
|
||||
}
|
||||
|
||||
recordEvent( `${ eventName }_view`, {
|
||||
recordEvent( `${ listEventPrefix }view`, {
|
||||
number_tasks: visibleTasks.length,
|
||||
store_connected: profileItems.wccom_connected,
|
||||
} );
|
||||
|
@ -199,7 +201,7 @@ export const TaskList: React.FC< TaskListProps > = ( {
|
|||
};
|
||||
|
||||
const trackClick = ( task: TaskType ) => {
|
||||
recordEvent( `${ eventName }_click`, {
|
||||
recordEvent( `${ listEventPrefix }click`, {
|
||||
task_name: task.id,
|
||||
} );
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue