Skip to content

Commit

Permalink
fix noisy analtyics
Browse files Browse the repository at this point in the history
  • Loading branch information
ritch committed Sep 26, 2024
1 parent e152852 commit 1839099
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/packages/analytics/src/usingAnalytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ export class Analytics {
if (this._segment) return;
this._debug = info?.debug;
if (!info || info.doNotTrack) {
console.warn("Analytics disabled");
console.log(info);
if (this._debug) {
console.warn("Analytics disabled");
console.log(info);
}
this.disable();
return;
}
Expand All @@ -66,7 +68,9 @@ export class Analytics {
}
this._disableUrlTracking = info.disableUrlTracking;
if (!info.writeKey) {
console.warn("Analytics disabled (no write key)");
if (this._debug) {
console.warn("Analytics disabled (no write key)");
}
this.disable();
return;
}
Expand Down

0 comments on commit 1839099

Please sign in to comment.