diff --git a/.idea/dictionaries/m.xml b/.idea/dictionaries/m.xml index bdbc0fbe43..616e93aa4e 100644 --- a/.idea/dictionaries/m.xml +++ b/.idea/dictionaries/m.xml @@ -62,6 +62,7 @@ lazypipe ldflags localforage + logrocket mikepsinn mindfirst minifying diff --git a/src/js/qmHelpers.js b/src/js/qmHelpers.js index 3ad7635806..32263b694f 100644 --- a/src/js/qmHelpers.js +++ b/src/js/qmHelpers.js @@ -9002,25 +9002,28 @@ var qm = { name: user.displayName, }) } - if(typeof LogRocket !== "undefined" && qm.appMode.isProduction()){ - LogRocket.init('zi2x4l/quantimodo'); - LogRocket.identify(user.id, { - name: user.displayName, - email: user.email, - upgraded: user.stripeActive, - // Add your own custom user variables here, ie: - subscriptionType: 'pro' - }); - if(typeof drift !== "undefined"){ - LogRocket.getSessionURL(function(sessionURL){ - drift.track('LogRocket', {sessionURL: sessionURL}); + if(typeof LogRocket !== "undefined"){ + var record = qm.appMode.isProduction() || qm.urlHelper.getParam('logrocket'); + if(record){ + LogRocket.init('zi2x4l/quantimodo'); + LogRocket.identify(user.id, { + name: user.displayName, + email: user.email, + upgraded: user.stripeActive, + // Add your own custom user variables here, ie: + subscriptionType: 'pro' }); - } - if(typeof Bugsnag !== "undefined"){ - Bugsnag.beforeNotify = function(data){ - data.metaData.sessionURL = LogRocket.sessionURL; - return data; - }; + if(typeof drift !== "undefined"){ + LogRocket.getSessionURL(function(sessionURL){ + drift.track('LogRocket', {sessionURL: sessionURL}); + }); + } + if(typeof Bugsnag !== "undefined"){ + Bugsnag.beforeNotify = function(data){ + data.metaData.sessionURL = LogRocket.sessionURL; + return data; + }; + } } } },