Support for posthog super properties (#2774)

* Support for posthog super properties

* Use typed SuperProperties and add tests

* update superProperty in AppCoordinator
This commit is contained in:
Valere
2024-05-02 17:21:09 +02:00
committed by GitHub
parent 69c6e25f37
commit 65c7713f5b
7 changed files with 405 additions and 11 deletions

View File

@@ -14,6 +14,7 @@
// limitations under the License.
//
import AnalyticsEvents
import BackgroundTasks
import Combine
import MatrixRustSDK
@@ -313,7 +314,9 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
applicationId: appSettings.bugReportApplicationId,
sdkGitSHA: sdkGitSha(),
maxUploadSize: appSettings.bugReportMaxUploadSize))
ServiceLocator.shared.register(analytics: AnalyticsService(client: PostHogAnalyticsClient(),
let posthogAnalyticsClient = PostHogAnalyticsClient()
posthogAnalyticsClient.updateSuperProperties(AnalyticsEvent.SuperProperties(appPlatform: nil, cryptoSDK: .Rust, cryptoSDKVersion: sdkGitSha()))
ServiceLocator.shared.register(analytics: AnalyticsService(client: posthogAnalyticsClient,
appSettings: appSettings,
bugReportService: ServiceLocator.shared.bugReportService))
}