Hi I am trying to add a event to track in Google Analytics,
Here is one working example:
$(document).on('change', 'select', function(e) {
ga('send', 'event', 'widget', 'select data', $(e.currentTarget).val());
});
And I am trying to track if a download button is clicked in my shiny app, and I tried:
$(link) .on('shiny:filedownload', function(e) {
ga('send', 'event', 'download', e.name, e.href)
});
It didn't work, I cannot find examples online, so just wondering if anyone came cross this problem before.