diff options
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/main.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/tracking.js | 28 |
2 files changed, 0 insertions, 30 deletions
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index 0ddf40b0405..39f2097c174 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -35,7 +35,6 @@ import initPerformanceBar from './performance_bar'; import initSearchAutocomplete from './search_autocomplete'; import GlFieldErrors from './gl_field_errors'; import initUserPopovers from './user_popovers'; -import { initUserTracking } from './tracking'; import { __ } from './locale'; import 'ee_else_ce/main_ee'; @@ -95,7 +94,6 @@ function deferredInitialisation() { initLogoAnimation(); initUsagePingConsent(); initUserPopovers(); - initUserTracking(); if (document.querySelector('.search')) initSearchAutocomplete(); diff --git a/app/assets/javascripts/tracking.js b/app/assets/javascripts/tracking.js index 03281b5ef49..a852f937eec 100644 --- a/app/assets/javascripts/tracking.js +++ b/app/assets/javascripts/tracking.js @@ -1,23 +1,5 @@ import $ from 'jquery'; -const DEFAULT_SNOWPLOW_OPTIONS = { - namespace: 'gl', - hostname: window.location.hostname, - cookieDomain: window.location.hostname, - appId: '', - userFingerprint: false, - respectDoNotTrack: true, - forceSecureTracker: true, - eventMethod: 'post', - contexts: { webPage: true }, - // Page tracking tracks a single event when the page loads. - pageTrackingEnabled: false, - // Activity tracking tracks when a user is still interacting with the page. - // Events like scrolling and mouse movements are used to determine if the - // user has the tab active and is still actively engaging. - activityTrackingEnabled: false, -}; - const extractData = (el, opts = {}) => { const { trackEvent, trackLabel = '', trackProperty = '' } = el.dataset; let trackValue = el.dataset.trackValue || el.value || ''; @@ -89,13 +71,3 @@ export default class Tracking { }; } } - -export function initUserTracking() { - if (!Tracking.enabled()) return; - - const opts = Object.assign({}, DEFAULT_SNOWPLOW_OPTIONS, window.snowplowOptions); - window.snowplow('newTracker', opts.namespace, opts.hostname, opts); - - if (opts.activityTrackingEnabled) window.snowplow('enableActivityTracking', 30, 30); - if (opts.pageTrackingEnabled) window.snowplow('trackPageView'); // must be after enableActivityTracking -} |