From 8ad34cd075757cef6223e95a8fdd5f37b326ee1e Mon Sep 17 00:00:00 2001 From: Martin Dutra Date: Thu, 25 Jan 2024 14:53:33 -0300 Subject: [PATCH] Track replies --- Nos/Service/Analytics.swift | 6 +++++- Nos/Views/RepliesView.swift | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Nos/Service/Analytics.swift b/Nos/Service/Analytics.swift index 222b2cca9..df26643f1 100644 --- a/Nos/Service/Analytics.swift +++ b/Nos/Service/Analytics.swift @@ -35,7 +35,11 @@ class Analytics { func published(note: JSONEvent) { track("Published Note", properties: ["length": note.content.count]) } - + + func published(reply: JSONEvent) { + track("Published Reply", properties: ["length": reply.content.count]) + } + // MARK: - Screens func startedOnboarding() { diff --git a/Nos/Views/RepliesView.swift b/Nos/Views/RepliesView.swift index 2c162b75c..d7166f84f 100644 --- a/Nos/Views/RepliesView.swift +++ b/Nos/Views/RepliesView.swift @@ -231,6 +231,7 @@ struct RepliesView: View { signature: "" ) try await relayService.publishToAll(event: jsonEvent, signingKey: keyPair, context: viewContext) + analytics.published(reply: jsonEvent) } catch { alert = AlertState(title: { TextState(String(localized: .localizable.error))