SDK Analytics: Implement framework-agnostic universal router detector
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Task
Implement the universal router detector POC (proven to work in Next.js and Angular) in SDK Analytics core without framework-specific dependencies. This will provide framework-agnostic routing change detection that works across different JavaScript frameworks.
Additionally, document the internal routing detection mechanism to help developers understand how the system works.
Proposed Objective
Internal Improvement
Proposed Priority
Priority 2 - Should be done soon
Acceptance Criteria
- Universal router detector implemented in SDK Analytics without Next.js dependencies
- Router detector works with Angular (validated from POC)
- Router detector works with Next.js (validated from POC)
- Router detector works with other popular frameworks (React Router, Vue Router)
- Internal documentation created explaining routing detection mechanism
- Code is well-commented explaining detection strategy
- Unit tests cover router detection logic
- Integration tests validate detection across frameworks
External Links
- POC examples:
examples/nextjs/andexamples/angular/ - Related issue: #33497 (Custom routing detection API)
Assumptions & Initiation Needs
- POC has been validated and works correctly in Next.js and Angular
- Current implementation in examples may have Next.js-specific dependencies
- Need to extract core detection logic into framework-agnostic module
- Documentation should cover URL change detection, History API usage, and event handling
Quality Assurance Notes & Workarounds
- Test with multiple framework versions to ensure compatibility
- Verify no framework-specific code remains in core detector
- Validate performance impact of detection mechanism
Sub-Tasks & Estimates
- Extract core router detection logic from POC implementations
- Remove Next.js-specific dependencies from detector
- Create framework-agnostic detection module in SDK core
- Add comprehensive code comments explaining detection strategy
- Write internal documentation on routing detection mechanism
- Create unit tests for router detector
- Add integration tests for Angular compatibility
- Add integration tests for Next.js compatibility
- Add integration tests for React Router compatibility
- Update example projects to use new universal detector
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the POC implementations in examples/nextjs/ and examples/angular/, then review related issue #33497 for the surrounding routing API. Define the framework-agnostic SDK core module around URL changes, History API usage, and event handling. Done means the detector, documentation, comments, unit tests, and framework integration tests cover the listed frameworks without Next.js-specific dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, javascript, nextjs, react
- Domain
- documentation, frontend, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100