Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_snowplow.html.haml « layouts « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fc3b12acc46d9c0098e3aa327f7fb51ae2504925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
- return unless Gitlab::Tracking.enabled?

= javascript_tag do
  :plain
    ;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
    p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
    };p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
    n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","#{asset_url('snowplow/sp.js')}","snowplow"));

    window.snowplowOptions = #{Gitlab::Tracking.options(@group).to_json}

    gl = window.gl || {};
    gl.snowplowStandardContext = #{Gitlab::Tracking::StandardContext.new.to_context.to_json.to_json}
    gl.snowplowPseudonymizedPageUrl = #{masked_page_url.to_json};