No Description

wc-status-widget.js 737B

123456789101112131415161718192021222324252627282930313233
  1. /*global jQuery */
  2. (function( $ ) {
  3. var recordEvent = function( link ) {
  4. window.wcTracks.recordEvent( 'status_widget_click', {
  5. link: link
  6. } );
  7. };
  8. $( '.sales-this-month a' ).on( 'click', function() {
  9. recordEvent( 'net-sales' );
  10. });
  11. $( '.best-seller-this-month a' ).on( 'click', function() {
  12. recordEvent( 'best-seller-this-month' );
  13. });
  14. $( '.processing-orders a' ).on( 'click', function() {
  15. recordEvent( 'orders-processing' );
  16. });
  17. $( '.on-hold-orders a' ).on( 'click', function() {
  18. recordEvent( 'orders-on-hold' );
  19. });
  20. $( '.low-in-stock a' ).on( 'click', function() {
  21. recordEvent( 'low-stock' );
  22. });
  23. $( '.out-of-stock a' ).on( 'click', function() {
  24. recordEvent( 'out-of-stock' );
  25. });
  26. })( jQuery );