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:
@@ -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])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user