2021-02-11 21:47:26 +00:00
|
|
|
/*global jQuery */
|
|
|
|
(function( $ ) {
|
2021-02-18 23:02:35 +00:00
|
|
|
var recordEvent = function( link ) {
|
|
|
|
window.wcTracks.recordEvent( 'status_widget_click', {
|
|
|
|
link: link
|
|
|
|
} );
|
|
|
|
};
|
2021-02-11 21:47:26 +00:00
|
|
|
|
2021-02-18 23:02:35 +00:00
|
|
|
$( '.sales-this-month a' ).on( 'click', function() {
|
|
|
|
recordEvent( 'net-sales' );
|
|
|
|
});
|
2021-02-11 21:47:26 +00:00
|
|
|
|
2021-02-18 21:17:27 +00:00
|
|
|
$( '.best-seller-this-month a' ).on( 'click', function() {
|
|
|
|
recordEvent( 'best-seller-this-month' );
|
|
|
|
});
|
|
|
|
|
2021-02-18 23:02:35 +00:00
|
|
|
$( '.processing-orders a' ).on( 'click', function() {
|
|
|
|
recordEvent( 'orders-processing' );
|
|
|
|
});
|
2021-02-11 21:47:26 +00:00
|
|
|
|
2021-02-18 23:02:35 +00:00
|
|
|
$( '.on-hold-orders a' ).on( 'click', function() {
|
|
|
|
recordEvent( 'orders-on-hold' );
|
|
|
|
});
|
2021-02-11 21:47:26 +00:00
|
|
|
|
2021-02-18 23:02:35 +00:00
|
|
|
$( '.low-in-stock a' ).on( 'click', function() {
|
|
|
|
recordEvent( 'low-stock' );
|
|
|
|
});
|
2021-02-11 21:47:26 +00:00
|
|
|
|
2021-02-18 23:02:35 +00:00
|
|
|
$( '.out-of-stock a' ).on( 'click', function() {
|
|
|
|
recordEvent( 'out-of-stock' );
|
|
|
|
});
|
2021-02-11 21:47:26 +00:00
|
|
|
})( jQuery );
|