Skip to content

Commit

Permalink
Merge pull request #858 from planetary-social/787/posthog_replies
Browse files Browse the repository at this point in the history
Track replies
  • Loading branch information
joshuatbrown authored Jan 26, 2024
2 parents a0c6726 + 5319a6b commit 829d7c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Nos/Service/Analytics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
1 change: 1 addition & 0 deletions Nos/Views/RepliesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 829d7c8

Please sign in to comment.