We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27398a9 commit f8bfd15Copy full SHA for f8bfd15
pages/tools/lib/postAnalytics.ts
@@ -27,6 +27,11 @@ export async function postAnalytics({
27
eventPayload,
28
}: AnalyticsParams) {
29
try {
30
+ if (process.env.NODE_ENV !== 'production') {
31
+ console.log('Analytics event is disabled in development mode.');
32
+ return;
33
+ }
34
+
35
const deviceType = /Mobi/.test(navigator.userAgent) ? 'Mobile' : 'Desktop';
36
37
const response = await fetch(
0 commit comments