Skip to content

Commit

Permalink
chore: Update Matomo event names
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinperignon committed Apr 4, 2023
1 parent 34bc5b5 commit 9bcad6e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Mail/Views/Bottom sheets/Actions/ActionsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ enum ActionsTarget: Equatable {
globalSheet.close()
if let matomoCategory, let matomoName = action.matomoName {
if case let .threads(threads, isMultipleSelectionEnabled) = target, isMultipleSelectionEnabled {
matomo.trackBulkEvent(eventWithCategory: matomoCategory, name: matomoName, numberOfItems: threads.count)
matomo.trackBulkEvent(eventWithCategory: matomoCategory, name: matomoName.capitalized, numberOfItems: threads.count)
} else {
matomo.track(eventWithCategory: matomoCategory, name: matomoName)
}
Expand Down
2 changes: 1 addition & 1 deletion Mail/Views/Thread List/FlushFolderAlertView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct FlushFolderAlertView: View {
secondaryButtonTitle: MailResourcesStrings.Localizable.buttonClose) {
if let folder, flushAlert.deletedMessages == nil {
@InjectService var matomo: MatomoUtils
matomo.track(eventWithCategory: .threadList, name: "empty\(folder.matomoName)Confirm")
matomo.track(eventWithCategory: .threadList, name: "empty\(folder.matomoName.capitalized)Confirm")
}
Task {
await flushAlert.completion()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ import SwiftUI

func didTap(action: Action, flushAlert: Binding<FlushAlertState?>) async throws {
if let matomoName = action.matomoName {
matomo.trackBulkEvent(eventWithCategory: .threadActions, name: matomoName, numberOfItems: selectedItems.count)
matomo.trackBulkEvent(eventWithCategory: .threadActions, name: matomoName.capitalized, numberOfItems: selectedItems.count)
}
switch action {
case .markAsRead, .markAsUnread:
Expand Down

0 comments on commit 9bcad6e

Please sign in to comment.