Migrate analytics-coffee #945
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Frontend Migration
Description
In this PR, I have migrated and removed the old analytics.coffee file, which included the virtualPageview(false) logic and previously used to disable virtual pageviews in Google Analytics for OnTrack.
Since the latest gtag.js script has already been added to index.html which is compatible with Angular 17 and is working as expected. So, this legacy logic is no longer needed, and this cleanup helps simplify the codebase.
Type of change
How Has This Been Tested?
To test this change, I first ran the project with the analytics.coffee file still in place. While navigating through different pages, I opened the Network tab in the browser’s developer tools and filtered the requests using the keyword “google” to track Google Analytics activity.
Then, I removed the analytics.coffee file and repeated the same steps. I compared both results to check for any differences in tracking behavior.
I also used the Google Analytics Debugger extension to inspect the presence and frequency of the "page_view" events. After comparing both runs, I didn’t observe any noticeable difference in tracking or event counts.
This confirmed that removing the analytics.coffee file does not impact the current analytics setup.
Screenshots
Before removal of analytics.coffee

Testing with Google Analytics Debugger Tool : (before removal of analytics.coffee )

After removal of analytics.coffee

Testing with Google Analytics Debugger Tool : (after removal of analytics.coffee )

Testing Checklist:
Checklist: