I have a nextjs app with firebase-analytics.
I'm using some dynamic routes, for example /object/{OBJECT_ID}/details
In ga4, in the Pages and screens section, if I filter by Page path, I get a bunch of different paths that are supposed to be grouped together
/object/abc-123/details
/object/def-456/details
/object/ghi-789/details
If I filter by Page title, the pages are still not grouped together because my page titles are translated
Details
Détails
Detalles
I'm using the Automatically track screens feature of firebase-analytics.
I'm considering 3 different solutions:
Disable automatic screen tracking and manually trigger events using nextjs router
- The doc does not mention how to disable screen tracking on the web.
I tried to initialize analytics using the following, but I still see
page_viewevents in DebugView:
import { initializeAnalytics } from "firebase/analytics"; import { initializeApp } from "firebase/app"; const app = initializeApp(firebaseConfig); const analytics = initializeAnalytics(app, { config: { send_page_view: false, }, });- I'm not sure of the proper way to manually trigger events using nextjs router
- The doc does not mention how to disable screen tracking on the web.
I tried to initialize analytics using the following, but I still see
Find a way to group the related pages in ga4 so that it ignores my URL parameters
Find a way to link together the pages that have translated titles
Is any of this possible? I feel like this should be a fairly common usecase, but I can't find any information about it.