Add polls analytics (#1691)

* Refactor location events

* Add poll analytics
This commit is contained in:
Alfonso Grillo
2023-09-13 09:28:44 +02:00
committed by GitHub
parent dc5514bc0b
commit f3618cda9d
10 changed files with 105 additions and 54 deletions
@@ -566,7 +566,7 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
self.analytics.trackComposer(inThread: false,
isEditing: false,
isReply: false,
locationType: isUserLocation ? .myLocation : .pin,
messageType: isUserLocation ? .location(.user) : .location(.pin),
startsThread: nil)
case .close:
self.navigationSplitCoordinator.setSheetCoordinator(nil)
@@ -606,6 +606,14 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
let result = await roomProxy.createPoll(question: question, answers: options, pollKind: pollKind)
self.analytics.trackComposer(inThread: false,
isEditing: false,
isReply: false,
messageType: .poll,
startsThread: nil)
self.analytics.trackPollCreated(isUndisclosed: pollKind == .undisclosed, numberOfAnswers: options.count)
switch result {
case .success:
break