UTM Campaign 파라미터를 Analytics에 설정된 파라미터 상수값 사용
This commit is contained in:
parent
e83164ded5
commit
2626245e6d
|
@ -94,8 +94,15 @@ struct SplashView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
nextAppStep()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private func nextAppStep() {
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
|
if !UserDefaults.string(forKey: UserDefaultsKey.token).trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
|
||||||
if AppState.shared.pushRoomId > 0 {
|
if AppState.shared.pushRoomId > 0 {
|
||||||
liveViewModel.enterLiveRoom(roomId: AppState.shared.pushRoomId)
|
liveViewModel.enterLiveRoom(roomId: AppState.shared.pushRoomId)
|
||||||
} else if AppState.shared.pushChannelId > 0 {
|
} else if AppState.shared.pushChannelId > 0 {
|
||||||
|
@ -107,7 +114,8 @@ struct SplashView: View {
|
||||||
} else {
|
} else {
|
||||||
AppState.shared.setAppStep(step: .main)
|
AppState.shared.setAppStep(step: .main)
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
AppState.shared.setAppStep(step: .main)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,34 +141,10 @@ struct SplashView: View {
|
||||||
} else if latestMajor == major && latestMinor == minor && latestPatch > patch {
|
} else if latestMajor == major && latestMinor == minor && latestPatch > patch {
|
||||||
self.isShowUpdatePopup = true
|
self.isShowUpdatePopup = true
|
||||||
} else {
|
} else {
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) {
|
nextAppStep()
|
||||||
withAnimation {
|
|
||||||
if AppState.shared.pushRoomId > 0 {
|
|
||||||
liveViewModel.enterLiveRoom(roomId: AppState.shared.pushRoomId)
|
|
||||||
} else if AppState.shared.pushChannelId > 0 {
|
|
||||||
AppState.shared.setAppStep(step: .creatorDetail(userId: AppState.shared.pushChannelId))
|
|
||||||
} else if AppState.shared.pushAudioContentId > 0 {
|
|
||||||
AppState.shared.setAppStep(step: .contentDetail(contentId: AppState.shared.pushAudioContentId))
|
|
||||||
} else {
|
|
||||||
AppState.shared.setAppStep(step: .main)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) {
|
nextAppStep()
|
||||||
withAnimation {
|
|
||||||
if AppState.shared.pushRoomId > 0 {
|
|
||||||
liveViewModel.enterLiveRoom(roomId: AppState.shared.pushRoomId)
|
|
||||||
} else if AppState.shared.pushChannelId > 0 {
|
|
||||||
AppState.shared.setAppStep(step: .creatorDetail(userId: AppState.shared.pushChannelId))
|
|
||||||
} else if AppState.shared.pushAudioContentId > 0 {
|
|
||||||
AppState.shared.setAppStep(step: .contentDetail(contentId: AppState.shared.pushAudioContentId))
|
|
||||||
} else {
|
|
||||||
AppState.shared.setAppStep(step: .main)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,10 +24,10 @@ class FirebaseTracking {
|
||||||
let utmCampaign = AppState.shared.marketingUtmCampaign.trimmingCharacters(in: .whitespacesAndNewlines)
|
let utmCampaign = AppState.shared.marketingUtmCampaign.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
|
|
||||||
if !utmSource.isEmpty && !utmMedium.isEmpty && !utmCampaign.isEmpty {
|
if !utmSource.isEmpty && !utmMedium.isEmpty && !utmCampaign.isEmpty {
|
||||||
Analytics.logEvent("campaign_utm", parameters: [
|
Analytics.logEvent(AnalyticsEventCampaignDetails, parameters: [
|
||||||
"utm_source": utmSource,
|
AnalyticsParameterSource: utmSource,
|
||||||
"utm_medium": utmMedium,
|
AnalyticsParameterMedium: utmMedium,
|
||||||
"utm_campaign": utmCampaign
|
AnalyticsParameterCampaign: utmCampaign
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue