From 06096212acabcd40ff9302e9f683088db674bf1d Mon Sep 17 00:00:00 2001 From: "mathieu J." Date: Thu, 28 Nov 2024 10:42:35 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=88=20(AccountKit):=20Add=20missing=20?= =?UTF-8?q?logEvent=20caregiver=5Fselect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Managers/Caregivers/CaregiverManager.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Modules/AccountKit/Sources/Managers/Caregivers/CaregiverManager.swift b/Modules/AccountKit/Sources/Managers/Caregivers/CaregiverManager.swift index 5723f0788b..9a9195ebc3 100644 --- a/Modules/AccountKit/Sources/Managers/Caregivers/CaregiverManager.swift +++ b/Modules/AccountKit/Sources/Managers/Caregivers/CaregiverManager.swift @@ -113,10 +113,13 @@ public class CaregiverManager { } public func setCurrentCaregiver(byID id: String) { + let previousCaregiverID: String? = self.currentCaregiver.value?.id guard let currentCaregiver = self.caregiverList.value.first(where: { $0.id == id }) else { return } self.currentCaregiver.send(currentCaregiver) + + AnalyticsManager.logEventCaregiverSelect(from: previousCaregiverID, to: currentCaregiver.id) AnalyticsManager.setDefaultEventParameterCaregiverUid(currentCaregiver.id) AnalyticsManager.setUserPropertyCaregiverProfessions(values: currentCaregiver.professions) }