From 4b414c048abb4ffe9083e866f45dcaddaa9d5113 Mon Sep 17 00:00:00 2001 From: Evandro Fonseca Junior Date: Tue, 20 Jan 2026 21:38:55 -0300 Subject: [PATCH] refactor(analytics): update Google Analytics collection endpoint for improved tracking - Modified the Google Analytics collection endpoint in the Next.js configuration to include the automatic addition of "/g/collect" in the transport URL. - Enhanced comments for better clarity regarding the changes made to the analytics routing. --- next.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/next.config.ts b/next.config.ts index 3921ff0..68b7cbc 100644 --- a/next.config.ts +++ b/next.config.ts @@ -85,8 +85,9 @@ const nextConfig: NextConfig = { destination: "https://www.googletagmanager.com/gtag/js?id=G-QTT9QT0T3S", }, // Google Analytics - Endpoint de coleta (camuflado como API de vitals) + // O gtag.js adiciona "/g/collect" automaticamente ao final da transport_url { - source: "/sys/api/vitals", + source: "/sys/api/vitals/g/collect", destination: "https://www.google-analytics.com/g/collect", }, ];