Skip to content

feat(analytics): track app launch event on startup#13334

Merged
DeJeune merged 3 commits intomainfrom
feat/track-app-launch
Mar 9, 2026
Merged

feat(analytics): track app launch event on startup#13334
DeJeune merged 3 commits intomainfrom
feat/track-app-launch

Conversation

@kangfenmao
Copy link
Copy Markdown
Collaborator

What this PR does

Before this PR:

  • AnalyticsService only tracks token usage events

After this PR:

  • AnalyticsService tracks app launch events on startup, reporting app version and OS platform

Why we need it and why it was done in this way

The following tradeoffs were made:

  • Uses the generic track() method instead of trackAppLaunch() to avoid type definition inconsistencies with the SDK

The following alternatives were considered:

  • N/A

Breaking changes

None

Special notes for your reviewer

  • The trackAppLaunch() is called at the end of init(), ensuring analytics client is initialized first
  • Respects data collection settings - no tracking if disabled

Checklist

  • PR: The PR description is expressive enough and will help future contributors
  • Code: Write code that humans can understand and Keep it simple
  • Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
  • Upgrade: Impact of this change on upgrade flows was considered and addressed if required
  • Documentation: A user-guide update was considered and is present (link) or not required. Check this only when the PR introduces or changes a user-facing feature or behavior.
  • Self-review: I have reviewed my own code before requesting review from others

Release note

NONE

Add trackAppLaunch method to AnalyticsService that reports app version
and OS platform when the application starts.

Signed-off-by: kangfenmao <[email protected]>
@kangfenmao kangfenmao requested a review from DeJeune March 9, 2026 12:05
@DeJeune DeJeune merged commit 9618ea1 into main Mar 9, 2026
9 checks passed
@DeJeune DeJeune deleted the feat/track-app-launch branch March 9, 2026 15:44
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.

3 participants