Module: TrackingHelper

Defined in:
app/helpers/tracking_helper.rb

Instance Method Summary collapse

Instance Method Details

#tracking_attrs(label, action, property) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'app/helpers/tracking_helper.rb', line 4

def tracking_attrs(label, action, property)
  return {} unless ::Gitlab::Tracking.enabled?

  {
    data: {
      track_label: label,
      track_action: action,
      track_property: property
    }
  }
end

#tracking_attrs_data(label, action, property) ⇒ Object



16
17
18
# File 'app/helpers/tracking_helper.rb', line 16

def tracking_attrs_data(label, action, property)
  tracking_attrs(label, action, property).fetch(:data, {})
end