파이어베이스 트래킹
- login 트래킹 위치 수정 - marketing_pid 값 추가
This commit is contained in:
		| @@ -95,6 +95,7 @@ final class HomeViewModel: ObservableObject { | ||||
|                         } | ||||
|                          | ||||
|                         NotiflyClient.shared.setUser(userId: UserDefaults.int(forKey: .userId), params: params) | ||||
|                         FirebaseTracking.shared.login(method: "email") | ||||
|                     } | ||||
|                 } catch { | ||||
|                     print(error) | ||||
|   | ||||
| @@ -11,11 +11,23 @@ class FirebaseTracking { | ||||
|     static let shared = FirebaseTracking() | ||||
|      | ||||
|     func signUp(method: String) { | ||||
|         Analytics.logEvent(AnalyticsEventSignUp, parameters: [AnalyticsParameterMethod: method]) | ||||
|         Analytics.logEvent( | ||||
|             AnalyticsEventSignUp, | ||||
|             parameters: [ | ||||
|                 AnalyticsParameterMethod: method, | ||||
|                 "marketing_pid": UserDefaults.string(forKey: .marketingPid) | ||||
|             ] | ||||
|         ) | ||||
|     } | ||||
|      | ||||
|     func login(method: String) { | ||||
|         Analytics.logEvent(AnalyticsEventLogin, parameters: [AnalyticsParameterMethod: method]) | ||||
|         Analytics.logEvent( | ||||
|             AnalyticsEventLogin, | ||||
|             parameters: [ | ||||
|                 AnalyticsParameterMethod: method, | ||||
|                 "marketing_pid": UserDefaults.string(forKey: .marketingPid) | ||||
|             ] | ||||
|         ) | ||||
|     } | ||||
|      | ||||
|     func logUtm() { | ||||
|   | ||||
| @@ -50,7 +50,6 @@ final class LoginViewModel: ObservableObject { | ||||
|                     let decoded = try jsonDecoder.decode(ApiResponse<LoginResponse>.self, from: responseData) | ||||
|                      | ||||
|                     if let data = decoded.data, decoded.success { | ||||
|                         FirebaseTracking.shared.login(method: "email") | ||||
|                         UserDefaults.set(data.profileImage, forKey: .profileImage) | ||||
|                         UserDefaults.set(data.nickname, forKey: .nickname) | ||||
|                         UserDefaults.set(data.userId, forKey: .userId) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Yu Sung
					Yu Sung