gitlab-org--gitlab-foss/app/helpers/tracking_helper.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
403 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module TrackingHelper
def tracking_attrs(label, action, property)
return {} unless ::Gitlab::Tracking.enabled?
{
data: {
track_label: label,
track_action: action,
track_property: property
}
}
end
def tracking_attrs_data(label, action, property)
tracking_attrs(label, action, property).fetch(:data, {})
end
end