mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
Feature/4795 feature tracking matomo
This commit is contained in:
committed by
Frank Rotermund
parent
013047191e
commit
27723fa953
@@ -79,6 +79,7 @@ final class PollEditFormCoordinator: Coordinator, Presentable {
|
||||
guard let self = self else { return }
|
||||
|
||||
self.pollEditFormViewModel.stopLoading()
|
||||
self.log2Analytics(details: details, room: self.parameters.room)
|
||||
self.completion?()
|
||||
} failure: { [weak self] error in
|
||||
guard let self = self else { return }
|
||||
@@ -154,4 +155,28 @@ final class PollEditFormCoordinator: Coordinator, Presentable {
|
||||
|
||||
return mapping[key] ?? EditFormPollType.disclosed
|
||||
}
|
||||
|
||||
|
||||
// MARK: Bwi tracking
|
||||
private func log2Analytics(details: EditFormPollDetails, room: MXRoom) {
|
||||
BWIAnalyticsHelper.getRoomDeviceCount(room: room) { deviceCount in
|
||||
var eventName: String
|
||||
switch details.type {
|
||||
case .undisclosed:
|
||||
if details.showParticipants {
|
||||
eventName = "undisclosed_show_participants"
|
||||
} else {
|
||||
eventName = "undisclosed"
|
||||
}
|
||||
case .disclosed:
|
||||
if details.showParticipants {
|
||||
eventName = "disclosed_show_participants"
|
||||
} else {
|
||||
eventName = "disclosed"
|
||||
}
|
||||
}
|
||||
|
||||
BWIAnalytics.sharedTracker.trackEventWithDimension(category: "Feature", action: "SendPoll", dimension: BWIAnalyticsHelper.dimensionForDeviceCount(deviceCount), value: NSNumber(value: details.answerOptions.count), name: eventName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user