- GoogleAnalytics4 ga4 = GoogleAnalytics4.getInstance();
-
- // This will add a page_view similar to the old UA analytics.
- // We probably want to get rid of this once the application_launch event
- // is being processed properly.
- String[] params;
- if (headless)
- {
- params = new String[] { "page_location",
- GoogleAnalytics4.APPLICATION_BASE_URL + path, "page_title",
- APPLICATION_STARTED, "headless", "true" };
- }
- else
- {
- params = new String[] { "page_location", path, "page_title",
- APPLICATION_STARTED };
- }
- ga4.sendAnalytics("page_view", params);