chroe: task/analytics component review #586
Closed
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.
OnTrack Component Review
Team Member Name
Pasindu Fernando
Student ID :
s224263102
Component Name
Analytics Configuration (virtual page views)
Files in this Component
analytics.coffee (to be removed)
Description
The analytics.coffee file was previously responsible for configuring Google Analytics tracking in the AngularJS version of the application. Its key functionality included disabling automatic route change tracking by setting
$analyticsProvider.virtualPageviews(false), preventing virtual pageviews from being recorded.Why Removal is Required
It is no longer functional due to the migration to Angular 17.
All analytics functionality has been migrated to Google Analytics 4 (GA4), which is fully managed through gtag.js in index.html.
Virtual pageviews and event tracking are now handled explicitly using Angular’s Router and manual event tracking with gtag().
How Has This Been Tested?
Monitoring Network Activity (Before and After Removing analytics.coffee): there is no change in the network activity ( Browser developer tools-> network tab-> filter the keyword "google"), before and after removing analytics.coffee since tracking is now fully handled by gtag.js in index.html.
Modifying virtualPageviews to True/False : No visible change in pageview tracking behavior, indicating that analytics.coffee is no longer controlling analytics.
Screenshots
before commenting analytics.coffee file and depenency in config.coffee
After commenting analytics.coffee file and depenency in config.coffee

Testing Checklist:
Checklist:
Component Migration Plan:
Remove the File:analytics.coffee
Clean Up Dependencies:
Remove doubtfire.config.analytics from config.coffee.
Delete any references to angulartics or $analyticsProvider in doubtfire-angularjs.module.ts.