Skip to content

TT-4712 user and country analytics by year/month#321

Open
sarahentzel wants to merge 2 commits into
developfrom
TT-4712
Open

TT-4712 user and country analytics by year/month#321
sarahentzel wants to merge 2 commits into
developfrom
TT-4712

Conversation

@sarahentzel
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds monthly/yearly login analytics tracking to the renderer and introduces corresponding Orbit models and a DB migration to support user- and country-level aggregation.

Changes:

  • Trigger a login analytics “track” request during online initialization (Sources.tsx).
  • Add Orbit schema models and TypeScript record types for useranalytics and countryanalytics.
  • Add a SQL migration creating useranalytics and countryanalytics tables with unique (dimension, year, month) constraints.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/renderer/src/Sources.tsx Calls logLoginAnalytics after remote activation to record an online login.
src/renderer/src/schema.tsx Bumps schema version to 11 and registers useranalytics/countryanalytics models.
src/renderer/src/model/userAnalytics.tsx Adds Orbit record typing for user monthly analytics.
src/renderer/src/model/countryAnalytics.tsx Adds Orbit record typing for country monthly analytics.
src/renderer/src/model/index.tsx Exports the new analytics model types.
src/renderer/src/crud/logLoginAnalytics.ts Adds API helper to POST the login tracking event.
src/renderer/src/crud/index.ts Re-exports logLoginAnalytics from the CRUD barrel.
migration/r4.4/analytics.sql Creates useranalytics and countryanalytics tables and grants privileges.

Comment thread src/renderer/src/Sources.tsx Outdated
Comment thread src/renderer/src/crud/logLoginAnalytics.ts Outdated
try {
await axiosPost('useranalytics/track', undefined, token);
} catch (error) {
console.error('logLoginAnalytics', error);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you use logError, this would post to bugsnag. Do you want failures posted to bugsnag?

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