Add documentation "How to track an event" to Frontend documentation

Based on the implementation in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/7403 and https://gitlab.com/gitlab-org/gitlab-ee/issues/7827, we need to add a section about how we can track events on the Frontend.

Topics that should be covered:

  • Necessary data-track-* attributes (see implementation in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/7403)
  • How to use tracking helpers for applying tracking attributes conditionally in HAML files https://gitlab.com/gitlab-org/gitlab-ee/issues/7827
  • Attaching event handlers in stats.js
  • Reference to the snowplow documentation
Assignee Loading
Time tracking Loading