debian-mirror-gitlab/app/views/layouts/_snowplow.html.haml

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

18 lines
653 B
Text
Raw Normal View History

2021-09-30 23:02:18 +05:30
- return unless Gitlab::Tracking.enabled?
2019-10-12 21:52:04 +05:30
2022-06-21 17:19:12 +05:30
- namespace = @group || @project&.namespace || @namespace
2023-07-09 08:55:56 +05:30
= webpack_bundle_tag 'tracker'
2021-02-22 17:27:13 +05:30
= javascript_tag do
2019-10-12 21:52:04 +05:30
:plain
2021-11-11 11:23:49 +05:30
window.snowplowOptions = #{Gitlab::Tracking.options(@group).to_json}
2021-04-17 20:07:23 +05:30
gl = window.gl || {};
2022-08-27 11:52:29 +05:30
gl.snowplowStandardContext = #{Gitlab::Tracking::StandardContext.new(
2023-07-09 08:55:56 +05:30
namespace_id: namespace&.id,
plan_name: namespace&.actual_plan_name,
project_id: @project&.id,
user_id: current_user&.id,
2023-04-23 21:23:45 +05:30
new_nav: show_super_sidebar?
2022-08-27 11:52:29 +05:30
).to_context.to_json.to_json}
2022-01-26 12:08:38 +05:30
gl.snowplowPseudonymizedPageUrl = #{masked_page_url(group: namespace, project: @project).to_json};