add tracks event for clicks on `marketplace-suggestion-manage-link`

This commit is contained in:
haszari 2019-04-09 10:29:51 +12:00
parent 78aa67641b
commit 884474d133
2 changed files with 9 additions and 1 deletions

View File

@ -312,6 +312,12 @@
}
}
function addManageSuggestionsTracksHandler() {
$( 'a.marketplace-suggestion-manage-link' ).on( 'click', function() {
window.wcTracks.recordEvent( 'marketplace_suggestions_manage_clicked' );
} );
}
// Render suggestion data in appropriate places in UI.
function displaySuggestions( marketplaceSuggestionsApiData ) {
var usedSuggestionsContexts = [];
@ -377,6 +383,8 @@
if ( marketplace_suggestions.suggestions_data ) {
displaySuggestions( marketplace_suggestions.suggestions_data );
}
addManageSuggestionsTracksHandler();
});
})( jQuery, marketplace_suggestions, ajaxurl );

File diff suppressed because one or more lines are too long