enable cookies on optin

pull/5370/head
lianahus 1 year ago committed by yann300
parent 12a5032f45
commit 5bfdf75c89
  1. 11
      apps/remix-ide/src/assets/js/loader.js

@ -17,8 +17,11 @@ if (domains[window.location.hostname]) {
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setExcludedQueryParams", ["code","gist"]]); _paq.push(["setExcludedQueryParams", ["code","gist"]]);
_paq.push(["setExcludedReferrers", ["etherscan.io"]]); _paq.push(["setExcludedReferrers", ["etherscan.io"]]);
_paq.push(['disableCookies']);
_paq.push(['enableJSErrorTracking']); _paq.push(['enableJSErrorTracking']);
// require user tracking consent before processing data
_paq.push(['requireConsent']);
// OR require user cookie consent before storing any cookies
_paq.push(['requireCookieConsent']);
_paq.push(['trackPageView']); _paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']); _paq.push(['enableLinkTracking']);
_paq.push(['enableHeartBeatTimer']); _paq.push(['enableHeartBeatTimer']);
@ -38,17 +41,17 @@ if (domains[window.location.hostname]) {
function isElectron() { function isElectron() {
// Renderer process // Renderer process
if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') { if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') {
return true return true
} }
// Main process // Main process
if (typeof process !== 'undefined' && typeof process.versions === 'object' && !!process.versions.electron) { if (typeof process !== 'undefined' && typeof process.versions === 'object' && !!process.versions.electron) {
return true return true
} }
// Detect the user agent when the `nodeIntegration` option is set to false // Detect the user agent when the `nodeIntegration` option is set to false
if (typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Electron') >= 0) { if (typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Electron') >= 0) {
return true return true
} }
return false return false

Loading…
Cancel
Save