Skip to content

Commit

Permalink
♻️ Update debugger to show group/profile names
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaatttt committed Apr 26, 2022
1 parent 8828ce9 commit 81824eb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/AppcuesKit/Appcues.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public class Appcues: NSObject {
}

storage.groupID = groupID
publish(TrackingUpdate(type: .group, properties: properties))
publish(TrackingUpdate(type: .group(groupID), properties: properties))
}

/// Generate a unique ID for the current user when there is not a known identity to use in
Expand Down
2 changes: 1 addition & 1 deletion Sources/AppcuesKit/Data/Analytics/TrackingUpdate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal struct TrackingUpdate {
case event(name: String, interactive: Bool)
case screen(String)
case profile
case group
case group(String?)
}

enum Policy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,10 @@ extension DebugViewModel {
self.name = title
case .profile:
self.type = .profile
self.name = "Profile Update"
case .group:
self.name = "\(update.properties?["userId"] ?? "Profile Update")"
case let .group(groupID):
self.type = .group
self.name = "Group Update"
self.name = "\(groupID ?? "-")"
}
}
}
Expand Down

0 comments on commit 81824eb

Please sign in to comment.