Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: disable analytics in debug

ammarahm-ed56bb3813446b
diff --git a/apps/mobile/src/utils/analytics/index.js b/apps/mobile/src/utils/analytics/index.js
index 96adaad8d..307d2133d 100644
--- a/apps/mobile/src/utils/analytics/index.js
+++ b/apps/mobile/src/utils/analytics/index.js
@@ -62,6 +62,7 @@ async function saveAnalytics(route, value = true) {
*/
async function pageView(route, prevRoute = '', conditions = ['/welcome'], once = true) {
+ if (__DEV__) return;
if (!(await canUpdateAnalytics(route, conditions)) && once) return;
let body = {
payload: {
@@ -93,6 +94,7 @@ async function pageView(route, prevRoute = '', conditions = ['/welcome'], once =
}
async function sendEvent(type, value, once = true) {
+ if (__DEV__) return;
if (!(await canUpdateAnalytics(type)) && once) return;
let body = {
payload: {