앱스플라이어 딥링크 설정
- 앱스플라이어 Onelink를 타고 들어온 경우 pid와 utm설정
This commit is contained in:
@@ -124,22 +124,28 @@ extension AppDelegate: DeepLinkDelegate {
|
||||
return
|
||||
}
|
||||
|
||||
UserDefaults.set(deepLinkObj.clickEvent["deep_link_sub1"] as? String ?? "", forKey: .marketingPid)
|
||||
let pid = deepLinkObj.clickEvent["deep_link_sub1"] as? String ?? ""
|
||||
if !pid.isEmpty {
|
||||
UserDefaults.set(pid, forKey: .marketingPid)
|
||||
}
|
||||
|
||||
AppState.shared.marketingUtmSource = deepLinkObj.clickEvent["deep_link_sub2"] as? String ?? ""
|
||||
AppState.shared.marketingUtmMedium = deepLinkObj.clickEvent["deep_link_sub3"] as? String ?? ""
|
||||
AppState.shared.marketingUtmCampaign = deepLinkObj.clickEvent["deep_link_sub4"] as? String ?? ""
|
||||
|
||||
|
||||
let deepLinkValue = deepLinkObj.clickEvent["deep_link_value"] as? String ?? ""
|
||||
let deepLinkValueId = Int(deepLinkObj.clickEvent["deep_link_sub5"] as? String ?? "") ?? 0
|
||||
|
||||
if deepLinkValue == "series" {
|
||||
AppState.shared.pushSeriesId = deepLinkObj.clickEvent["deep_link_sub5"] as? Int ?? 0
|
||||
} else if deepLinkValue == "content" {
|
||||
AppState.shared.pushAudioContentId = deepLinkObj.clickEvent["deep_link_sub5"] as? Int ?? 0
|
||||
} else if deepLinkValue == "live" {
|
||||
AppState.shared.pushRoomId = deepLinkObj.clickEvent["deep_link_sub5"] as? Int ?? 0
|
||||
} else if deepLinkValue == "channel" {
|
||||
AppState.shared.pushChannelId = deepLinkObj.clickEvent["deep_link_sub5"] as? Int ?? 0
|
||||
if deepLinkValueId > 0 {
|
||||
if deepLinkValue == "series" {
|
||||
AppState.shared.pushSeriesId = deepLinkValueId
|
||||
} else if deepLinkValue == "content" {
|
||||
AppState.shared.pushAudioContentId = deepLinkValueId
|
||||
} else if deepLinkValue == "live" {
|
||||
AppState.shared.pushRoomId = deepLinkValueId
|
||||
} else if deepLinkValue == "channel" {
|
||||
AppState.shared.pushChannelId = deepLinkValueId
|
||||
}
|
||||
}
|
||||
|
||||
logUtmInFirebase()
|
||||
|
Reference in New Issue
Block a user