broadinstitute / dig-dug-portal

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Google Analytics Tracking Use Cases #57

Closed RichardBruskiewich closed 6 months ago

RichardBruskiewich commented 4 years ago

This page is to capture basic use cases for Google Analytics events / page tracking.

Initial broad stroke use cases mentioned so far:

  1. User visits: repeat visits, how long?
  2. User events: clicked buttons, etc.
  3. Error trapping
  4. Profiling: possibly a periodic timer triggering events to highlight timeouts or measure responsiveness of slow UI the application components (e.g. LocusZoom)

The current basic analytics implementation code in dig-dug-server and dig-dug-portal currently tags client users solely by the cookie tagged 'session' identifier which is stored in dig-dug-logins or (for anonymous public users) cached locally in the server.js module (Developer's note: this needs to be reviewed for robust implementation)

RichardBruskiewich commented 4 years ago

Regarding the design of the Portal-side Google Analytics events handling, the suggestion by @massung is that we specify an internal (module) library API of meaningfully named functions which reflect specific use cases, and configure a set of calls through the single generic GA event (AJAX) notification function.