Skip to content

Feature/player UI xapi tracking#712

Merged
sei-awelle merged 15 commits intomainfrom
feature/player-ui-xapi-tracking
May 7, 2026
Merged

Feature/player UI xapi tracking#712
sei-awelle merged 15 commits intomainfrom
feature/player-ui-xapi-tracking

Conversation

@sei-awelle
Copy link
Copy Markdown
Contributor

Add xAPI tracking UI integration for application and team switching

Integrates Player UI with xAPI tracking endpoints:

  • Application switching: Tracks when users navigate between Player apps (Wall, VM Console, etc.)
  • Team switching: Tracks when users change their active team
  • View entry: Tracks when users enter a view from player component init

Changes:

  • Add XApiService with methods for viewViewed(), applicationSwitched(), teamSwitched()
  • Call xAPI endpoints from player component lifecycle and application list
  • Fail silently on xAPI errors to prevent breaking UI functionality

All tracking happens via HTTP POST to Player API xAPI endpoints, which handle statement creation and LRS delivery.

sei-awelle added 6 commits May 1, 2026 14:26
- Add teamSwitched() method to XApiService calling POST /api/xapi/switched/view/{viewId}/team/{teamId}
- Call xAPI service from setPrimaryTeam() before reloading page
- Logs team switch statement before view refresh
Team switch xAPI statement is already emitted server-side in SetPrimary.Handler, so UI-side call creates duplicates. Removed UI call to emit only once from API.
Multiple subscriptions to data$ were triggering duplicate getView() API calls, which emitted duplicate 'viewed' xAPI statements. Added shareReplay(1) to share the observable result across all subscribers.
- Add viewViewed() method to XApiService
- Call from player component ngOnInit when entering view
- Ensures view viewed statement only logs on component navigation, not data fetches
@sei-awelle sei-awelle requested a review from a team as a code owner May 6, 2026 15:43
sei-awelle and others added 6 commits May 6, 2026 18:46
- Replace manual HttpClient calls with generated XApiService
- Add cross-platform swagger:gen-docker script using Docker
- Update to OpenAPI Generator v7.15.0
- Add cross-env and rimraf dependencies for cross-platform support
- Regenerate all Player API client files with latest generator
Comment thread serve.json Outdated
Comment thread swagger.json Outdated
@sei-awelle sei-awelle merged commit bdb4e55 into main May 7, 2026
7 checks passed
@sei-awelle sei-awelle deleted the feature/player-ui-xapi-tracking branch May 7, 2026 16:32
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