From 61ba7e42a1d8ad267d76ea926aa1106a2f7aaf83 Mon Sep 17 00:00:00 2001 From: Alessio Placitelli Date: Tue, 23 Apr 2024 16:36:32 +0200 Subject: [PATCH] Enable Glean automatic page load events This additionally removes the `max_events` option (we already default to 1 in recent versions) and changes the location of the logging enabled/disabled so that live debugging can happen without the logging being overwritten. --- client/src/telemetry/glean-context.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/telemetry/glean-context.tsx b/client/src/telemetry/glean-context.tsx index b72e278a8211..f3849e582d49 100644 --- a/client/src/telemetry/glean-context.tsx +++ b/client/src/telemetry/glean-context.tsx @@ -91,7 +91,7 @@ function glean(): GleanAnalytics { const uploadEnabled = !userIsOptedOut && GLEAN_ENABLED; Glean.initialize(GLEAN_APP_ID, uploadEnabled, { - maxEvents: 1, + enableAutoPageLoadEvents: true, channel: GLEAN_CHANNEL, migrateFromLegacyStorage: true, serverEndpoint: DEV_MODE @@ -101,8 +101,8 @@ function glean(): GleanAnalytics { if (DEV_MODE) { Glean.setDebugViewTag("mdn-dev"); + Glean.setLogPings(GLEAN_DEBUG); } - Glean.setLogPings(GLEAN_DEBUG); const gleanContext = { page: (page: PageProps) => {