gitlab-org--gitlab-foss/app/views/layouts/_snowplow.html.haml
Jeremy Jackson 1509768335 Changes snowplow to use cookies for sessions
This also restructures how and where the configuration for
Snowplow lives.
2019-08-28 06:52:14 +00:00

10 lines
574 B
Text

- return unless Gitlab::CurrentSettings.snowplow_enabled?
= javascript_tag nonce: true 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.snowplow_options(@group).to_json}