Skip to content

Commit

Permalink
📈 (Analytics): Users - improve parameters naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Nov 29, 2024
1 parent 6eae5e5 commit 550348b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public extension AnalyticsManager {

static func logEventCaregiverCreate(id: String, parameters: [String: Any] = [:]) {
let params: [String: Any] = [
"lk_caregiver_id_new": id,
"lk_caregiver_id_created": id,
].merging(parameters) { _, new in new }

logEvent(.caregiverCreate, parameters: params)
Expand All @@ -27,7 +27,7 @@ public extension AnalyticsManager {
static func logEventCaregiverSelect(from previous: String?, to new: String, parameters: [String: Any] = [:]) {
let params: [String: Any] = [
"lk_caregiver_id_previous": previous ?? NSNull(),
"lk_caregiver_id_new": new,
"lk_caregiver_id_selected": new,
].merging(parameters) { _, new in new }

logEvent(.caregiverSelect, parameters: params)
Expand All @@ -37,7 +37,7 @@ public extension AnalyticsManager {

static func logEventCarereceiverCreate(id: String, parameters: [String: Any] = [:]) {
let params: [String: Any] = [
"lk_carereceiver_id_new": id,
"lk_carereceiver_id_created": id,
].merging(parameters) { _, new in new }

logEvent(.carereceiverCreate, parameters: params)
Expand All @@ -55,7 +55,7 @@ public extension AnalyticsManager {
let carereceiversString = carereceivers.joined(separator: ",")

let params: [String: Any] = [
"lk_carereceivers_ids_new": carereceiversString,
"lk_carereceivers_ids_selected": carereceiversString,
].merging(parameters) { _, new in new }

logEvent(.carereceiversSelect, parameters: params)
Expand Down

0 comments on commit 550348b

Please sign in to comment.