Skip to content

Conversation

@Pasindufdo98
Copy link

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

  • Deleted: The analytics.coffee
  • Modified: config.coffee (removed the reference of the anaytics.coffee)
  • Modified: doubtfire-angularjs.module.ts (removed the reference of the anaytics.coffee)

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
with

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

After removal of analytics.coffee
without

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

Testing Checklist:

  • Tested in latest Chrome
  • Tested in latest Safari
  • Tested in latest Firefox

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review the Pull Request

@Pasindufdo98 Pasindufdo98 marked this pull request as ready for review June 19, 2025 02:23
@returnMarcco
Copy link

Hi @Pasindufdo98,

Can you please update the 'Migration Progress List' in README.MD.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants