Conditionally render tracking data-* attributes (only if Snowplow is enabled)
The following discussion from !7403 (merged) should be addressed:
-
@nick.thomas started a discussion: (+5 comments) Is it reasonable to include all these data- parameters when snowplow is disabled?
In order to enable tracking of certain events, we have added data-track-*
attributes to page elements in our HAML templates.
We should render tracking data-*
attributes only if Snowplow is enabled. Thus, we have to define multiple helpers for different elements (e.g., links, dropdowns, buttons, etc.) as proposed by @nick.thomas in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/7403#note_105582263
Edited by Martin Wortschack