Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: improve architecture - WPB-11396 #1995

Merged

Conversation

johnxnguyen
Copy link
Collaborator

@johnxnguyen johnxnguyen commented Oct 2, 2024

TaskWPB-11396 [iOS] improve analytics setup

Issue

This PR improves the architecture or our analytics setup so that we will be able to enable analytics during the login flow and track backup restore events. It also contains some various bug fixes and small refactoring.

Changes:

  • AnalyticsManager, AnalyticsSession are replaced with AnalyticsService.
  • AnalyticsService encapsulates the configuration, enabling, disabling, user management and tracking of events.
  • CountlyProtocol abstracts Countly.
  • Use cases for enabling and disabling tracking have been simplified.
  • AnalyticsEvent has become a struct, predefined events are now created by static helpers.
  • File organization
  • Bug fix: default segmentation (device type, os, etc) were not being tracked.

Testing

  • Updated unit tests for use cases
  • Unit tests for AnalyticsService

Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

Copy link
Contributor

github-actions bot commented Oct 2, 2024

Test Results

    4 files    712 suites   13m 18s ⏱️
5 259 tests 5 259 ✅ 0 💤 0 ❌
5 267 runs  5 267 ✅ 0 💤 0 ❌

Results for commit 783e4f8.

♻️ This comment has been updated with latest results.

@johnxnguyen johnxnguyen requested a review from netbe October 4, 2024 14:18
@johnxnguyen johnxnguyen requested a review from netbe October 7, 2024 09:26
Copy link
Collaborator

@netbe netbe left a comment

Choose a reason for hiding this comment

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

good to go!

@johnxnguyen johnxnguyen merged commit 64a84da into epic/analytics-wpb-8911 Oct 7, 2024
11 checks passed
@johnxnguyen johnxnguyen deleted the epic/analytics-improve-architecture branch October 7, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants