compiler-explorer / compiler-explorer/compiler-explorer
Move from analytics.js to gtag.js
- Dominant language
- TypeScript
- Stars
- 19.1k
- Forks
- 2.1k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 67
Description
IGoogle has updated Analytics and it's asking to upgrade from the old analytics.js to [gtag.js](https://developers.google.com/analytics/devguides/collection/gtagjs). It might be a good idea to look into it, but the old stuff is not deprecated afaik so we are in no rush whatsoever.
The only issue here is how to integrate it with our existing initialization code to respect user tracking preferences at [static/analytics.ts#L42](https://github.com/compiler-explorer/compiler-explorer/blob/main/static/analytics.ts#L42)
Contributor guide
Research direction
Read static/analytics.ts around line 42 and review the linked gtag.js documentation. Trace the existing initialization and user tracking-preference handling before deciding how the migration fits. Done means the analytics integration uses gtag.js while continuing to respect those preferences.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- analytics
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100