woocommerce/plugins/woocommerce-admin/client/wp-admin-scripts/product-tracking/product-edit.ts

19 lines
340 B
TypeScript

/**
* External dependencies
*/
import { recordEvent } from '@woocommerce/tracks';
/**
* Internal dependencies
*/
import { initProductScreenTracks } from './shared';
const initTracks = () => {
recordEvent( 'product_edit_view' );
initProductScreenTracks();
};
if ( productScreen && productScreen.name === 'edit' ) {
initTracks();
}