Skip to content

Add data-track attribute for Gitlab Internal Events

Ankit Panchal requested to merge ankit.panchal/data-event-tracking into master

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

  1. In any button of the page add data-event-tracking attribute.
  2. Something like below
  <gl-button
    data-event-tracking="i_analytics_dev_ops_adoption"
  >
   Click Me
  </gl-button>
  1. 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.

Merge request reports