blob: 10b2002dfef0e3c93924f1e279a1643ee6eb7e2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
- return unless Gitlab::Tracking.enabled?
- namespace = @group || @project&.namespace || @namespace
= webpack_bundle_tag 'tracker'
- if Gitlab.com? && Feature.enabled?(:browsersdk_tracking)
= webpack_bundle_tag 'analytics'
= 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};
|