Add data-track attribute for Gitlab Internal Events
What does this MR do and why?
Implements #414590 (closed)
This will ensure that if we want to track gitlab internal events for button, we do not need to write JavaScript code on Click handler. we can just add data-event-tracking
attribute with event value and it should work.
Previous MRs of implementing Internal Events - !125016 (merged) !123901 (merged)
How to set up and validate locally
- In any button of the page add
data-event-tracking
attribute. - Something like below
<gl-button
data-event-tracking="i_analytics_dev_ops_adoption"
>
Click Me
</gl-button>
- on clicking of the button two API call should go, one for redis hll and another to snowplow.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.