1.1.5: add analytics for stats_viewed and week_rated events

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
alexandrev-tibco
2026-06-11 13:49:33 +02:00
parent 946c788ef6
commit 72770801d3
3 changed files with 17 additions and 0 deletions
+15
View File
@@ -29,6 +29,12 @@ enum AnalyticsEvent {
static let iCloudSyncToggled = "icloud_sync_toggled"
static let notificationsToggled = "notifications_toggled"
static let languageChanged = "language_changed"
// Stats
static let statsViewed = "stats_viewed"
// Feedback loop
static let weekRated = "week_rated"
}
enum AnalyticsService {
@@ -103,4 +109,13 @@ enum AnalyticsService {
static func logNotificationsToggled(enabled: Bool) {
logEvent(AnalyticsEvent.notificationsToggled, parameters: ["enabled": enabled])
}
static func logStatsViewed() {
logEvent(AnalyticsEvent.statsViewed)
}
static func logWeekRated(rating: Int) {
let value = rating == 1 ? "liked" : rating == -1 ? "disliked" : "cleared"
logEvent(AnalyticsEvent.weekRated, parameters: ["rating": value])
}
}