debian-mirror-gitlab/app/views/layouts/_snowplow.html.haml
2023-07-09 08:55:56 +05:30

17 lines
653 B
Text

- return unless Gitlab::Tracking.enabled?
- namespace = @group || @project&.namespace || @namespace
= webpack_bundle_tag 'tracker'
= javascript_tag do
:plain
window.snowplowOptions = #{Gitlab::Tracking.options(@group).to_json}
gl = window.gl || {};
gl.snowplowStandardContext = #{Gitlab::Tracking::StandardContext.new(
namespace_id: namespace&.id,
plan_name: namespace&.actual_plan_name,
project_id: @project&.id,
user_id: current_user&.id,
new_nav: show_super_sidebar?
).to_context.to_json.to_json}
gl.snowplowPseudonymizedPageUrl = #{masked_page_url(group: namespace, project: @project).to_json};