ebiwd / EBI-Framework

The EMBL-EBI Visual Framework for websites and services.
https://www.ebi.ac.uk/style-lab/websites/
19 stars 16 forks source link

Add ability to log livefilter search #123

Closed khawkins98 closed 6 years ago

khawkins98 commented 6 years ago

Would be good to know what folks are searching for in the filters. We can repurpose the analyticsTrackInteraction function in foundationExtendEBI.js; something like:

if (analyticsLogging) {
  if ($('body').hasClass('google-analytics-loaded')) {
    analyticsTrackInteraction(filter,'Live filter search');
  }
}
khawkins98 commented 6 years ago

We'd also want to pass in an option to enable:

$('#livefilter-element').liveFilter({
  delay: 150, // don't burn the GA api quota
  analyticsLogging: true
});
khawkins98 commented 6 years ago
khawkins98 commented 6 years ago

Documentation added at https://www.ebi.ac.uk/style-lab/websites/patterns/live-filter.html