Showing
5 changed files
with
60 additions
and
3 deletions
| ... | @@ -235,6 +235,11 @@ var timer2: DispatchSourceTimer? | ... | @@ -235,6 +235,11 @@ var timer2: DispatchSourceTimer? |
| 235 | SwiftEventBus.post("pacing", sender: pacingEvent) | 235 | SwiftEventBus.post("pacing", sender: pacingEvent) |
| 236 | 236 | ||
| 237 | if (swiftApi().getTrackingStepsEnabled() == false) { | 237 | if (swiftApi().getTrackingStepsEnabled() == false) { |
| 238 | + let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | ||
| 239 | + firebaseEvent._eventName = "lovalty_steps_activation" | ||
| 240 | + firebaseEvent._parameters = nil | ||
| 241 | + SwiftEventBus.post("firebase", sender: firebaseEvent) | ||
| 242 | + | ||
| 238 | self.startTrackingSteps() | 243 | self.startTrackingSteps() |
| 239 | } | 244 | } |
| 240 | 245 | ... | ... |
| ... | @@ -151,6 +151,13 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -151,6 +151,13 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ |
| 151 | 151 | ||
| 152 | public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | 152 | public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| 153 | if (campaigns[indexPath.row]._ccms != nil) { | 153 | if (campaigns[indexPath.row]._ccms != nil) { |
| 154 | + | ||
| 155 | + let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | ||
| 156 | + firebaseEvent._eventName = "loyalty_sdk_offer_selected" | ||
| 157 | + firebaseEvent.setParameter = ("name", (campaigns[indexPath.row]._ccms?._title ?? "")) | ||
| 158 | + firebaseEvent.setParameter = ("type", "gift") | ||
| 159 | + SwiftEventBus.post("firebase", sender: firebaseEvent) | ||
| 160 | + | ||
| 154 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 161 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
| 155 | let vc = storyboard.instantiateViewController(withIdentifier: "ContextualViewController") as! SwiftWarplyFramework.ContextualViewController | 162 | let vc = storyboard.instantiateViewController(withIdentifier: "ContextualViewController") as! SwiftWarplyFramework.ContextualViewController |
| 156 | vc.ccms = campaigns[indexPath.row]._ccms | 163 | vc.ccms = campaigns[indexPath.row]._ccms |
| ... | @@ -189,6 +196,13 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -189,6 +196,13 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ |
| 189 | 196 | ||
| 190 | for item in couponsetsList { | 197 | for item in couponsetsList { |
| 191 | if (item.uuid == couponsetUuid) { | 198 | if (item.uuid == couponsetUuid) { |
| 199 | + | ||
| 200 | + let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | ||
| 201 | + firebaseEvent._eventName = "loyalty_sdk_offer_selected" | ||
| 202 | + firebaseEvent.setParameter = ("name", (item?.name ?? "")) | ||
| 203 | + firebaseEvent.setParameter = ("type", "coupon") | ||
| 204 | + SwiftEventBus.post("firebase", sender: firebaseEvent) | ||
| 205 | + | ||
| 192 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 206 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
| 193 | let vc = storyboard.instantiateViewController(withIdentifier: "CouponViewController") as! SwiftWarplyFramework.CouponViewController | 207 | let vc = storyboard.instantiateViewController(withIdentifier: "CouponViewController") as! SwiftWarplyFramework.CouponViewController |
| 194 | vc.couponset = item | 208 | vc.couponset = item | ... | ... |
| ... | @@ -125,6 +125,13 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -125,6 +125,13 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ |
| 125 | 125 | ||
| 126 | public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | 126 | public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| 127 | if (campaigns[indexPath.row]._ccms != nil) { | 127 | if (campaigns[indexPath.row]._ccms != nil) { |
| 128 | + | ||
| 129 | + let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | ||
| 130 | + firebaseEvent._eventName = "loyalty_sdk_offer_selected" | ||
| 131 | + firebaseEvent.setParameter = ("name", (campaigns[indexPath.row]._ccms?._title ?? "")) | ||
| 132 | + firebaseEvent.setParameter = ("type", "gift") | ||
| 133 | + SwiftEventBus.post("firebase", sender: firebaseEvent) | ||
| 134 | + | ||
| 128 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 135 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
| 129 | let vc = storyboard.instantiateViewController(withIdentifier: "ContextualViewController") as! SwiftWarplyFramework.ContextualViewController | 136 | let vc = storyboard.instantiateViewController(withIdentifier: "ContextualViewController") as! SwiftWarplyFramework.ContextualViewController |
| 130 | vc.ccms = campaigns[indexPath.row]._ccms | 137 | vc.ccms = campaigns[indexPath.row]._ccms |
| ... | @@ -162,6 +169,13 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -162,6 +169,13 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ |
| 162 | 169 | ||
| 163 | for item in couponsetsList { | 170 | for item in couponsetsList { |
| 164 | if (item.uuid == couponsetUuid) { | 171 | if (item.uuid == couponsetUuid) { |
| 172 | + | ||
| 173 | + let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | ||
| 174 | + firebaseEvent._eventName = "loyalty_sdk_offer_selected" | ||
| 175 | + firebaseEvent.setParameter = ("name", (item?.name ?? "")) | ||
| 176 | + firebaseEvent.setParameter = ("type", "coupon") | ||
| 177 | + SwiftEventBus.post("firebase", sender: firebaseEvent) | ||
| 178 | + | ||
| 165 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 179 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
| 166 | let vc = storyboard.instantiateViewController(withIdentifier: "CouponViewController") as! SwiftWarplyFramework.CouponViewController | 180 | let vc = storyboard.instantiateViewController(withIdentifier: "CouponViewController") as! SwiftWarplyFramework.CouponViewController |
| 167 | vc.couponset = item | 181 | vc.couponset = item | ... | ... |
| ... | @@ -375,9 +375,19 @@ import SwiftEventBus | ... | @@ -375,9 +375,19 @@ import SwiftEventBus |
| 375 | let dealsAnalysis = swiftApi.WarplyDealsAnalysisEventModel() | 375 | let dealsAnalysis = swiftApi.WarplyDealsAnalysisEventModel() |
| 376 | dealsAnalysis._isPressed = true | 376 | dealsAnalysis._isPressed = true |
| 377 | SwiftEventBus.post("analysis_pressed", sender: dealsAnalysis) | 377 | SwiftEventBus.post("analysis_pressed", sender: dealsAnalysis) |
| 378 | + | ||
| 379 | + let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | ||
| 380 | + firebaseEvent._eventName = "did_tap_gifts_for_you_badge" | ||
| 381 | + firebaseEvent.setParameter = ("screen", "Loyalty Wallet") | ||
| 382 | + SwiftEventBus.post("firebase", sender: firebaseEvent) | ||
| 378 | } | 383 | } |
| 379 | @IBAction func couponEarnButtonAction(_ sender: Any) { | 384 | @IBAction func couponEarnButtonAction(_ sender: Any) { |
| 380 | 385 | ||
| 386 | + let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | ||
| 387 | + firebaseEvent._eventName = "did_tap_deals_for_you_badge" | ||
| 388 | + firebaseEvent.setParameter = ("screen", "Loyalty Wallet") | ||
| 389 | + SwiftEventBus.post("firebase", sender: firebaseEvent) | ||
| 390 | + | ||
| 381 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 391 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
| 382 | let vc = storyboard.instantiateViewController(withIdentifier: "LoyaltyAnalysisViewController") as! SwiftWarplyFramework.LoyaltyAnalysisViewController | 392 | let vc = storyboard.instantiateViewController(withIdentifier: "LoyaltyAnalysisViewController") as! SwiftWarplyFramework.LoyaltyAnalysisViewController |
| 383 | self.navigationController?.pushViewController(vc, animated: true) | 393 | self.navigationController?.pushViewController(vc, animated: true) | ... | ... |
| ... | @@ -2675,7 +2675,7 @@ public class swiftApi { | ... | @@ -2675,7 +2675,7 @@ public class swiftApi { |
| 2675 | 2675 | ||
| 2676 | public class LoyaltySDKFirebaseEventModel { | 2676 | public class LoyaltySDKFirebaseEventModel { |
| 2677 | private var eventName: String | 2677 | private var eventName: String |
| 2678 | - private var parameters: [String: String] | 2678 | + private var parameters: [String: String]? |
| 2679 | 2679 | ||
| 2680 | 2680 | ||
| 2681 | public init() { | 2681 | public init() { |
| ... | @@ -2693,7 +2693,7 @@ public class swiftApi { | ... | @@ -2693,7 +2693,7 @@ public class swiftApi { |
| 2693 | } | 2693 | } |
| 2694 | } | 2694 | } |
| 2695 | 2695 | ||
| 2696 | - public var _parameters: [String: String] { | 2696 | + public var _parameters: [String: String]? { |
| 2697 | get { // getter | 2697 | get { // getter |
| 2698 | return self.parameters | 2698 | return self.parameters |
| 2699 | } | 2699 | } |
| ... | @@ -2709,7 +2709,7 @@ public class swiftApi { | ... | @@ -2709,7 +2709,7 @@ public class swiftApi { |
| 2709 | return (key: "", value: "") | 2709 | return (key: "", value: "") |
| 2710 | } | 2710 | } |
| 2711 | set(newValue) { //setter | 2711 | set(newValue) { //setter |
| 2712 | - self.parameters.updateValue(newValue.1, forKey: newValue.0) | 2712 | + self.parameters?.updateValue(newValue.1, forKey: newValue.0) |
| 2713 | 2713 | ||
| 2714 | } | 2714 | } |
| 2715 | } | 2715 | } |
| ... | @@ -4936,6 +4936,13 @@ public class swiftApi { | ... | @@ -4936,6 +4936,13 @@ public class swiftApi { |
| 4936 | 4936 | ||
| 4937 | for item in couponsetsList { | 4937 | for item in couponsetsList { |
| 4938 | if (item.uuid == couponsetUuid) { | 4938 | if (item.uuid == couponsetUuid) { |
| 4939 | + | ||
| 4940 | + let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | ||
| 4941 | + firebaseEvent._eventName = "loyalty_sdk_offer_selected" | ||
| 4942 | + firebaseEvent.setParameter = ("name", (item.name ?? "")) | ||
| 4943 | + firebaseEvent.setParameter = ("type", "coupon") | ||
| 4944 | + SwiftEventBus.post("firebase", sender: firebaseEvent) | ||
| 4945 | + | ||
| 4939 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 4946 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
| 4940 | let vc = storyboard.instantiateViewController(withIdentifier: "CouponViewController") as! SwiftWarplyFramework.CouponViewController | 4947 | let vc = storyboard.instantiateViewController(withIdentifier: "CouponViewController") as! SwiftWarplyFramework.CouponViewController |
| 4941 | vc.couponset = item | 4948 | vc.couponset = item |
| ... | @@ -4983,6 +4990,13 @@ public class swiftApi { | ... | @@ -4983,6 +4990,13 @@ public class swiftApi { |
| 4983 | // if (((ccms._loyaltyCampaignId == "") || (ccms._loyaltyCampaignId == "NA")) && ((ccms._zone == "COSMOTE_APP_GIFTS4U") || (ccms._zone == "COSMOTE_APP_MORE4U"))) { | 4990 | // if (((ccms._loyaltyCampaignId == "") || (ccms._loyaltyCampaignId == "NA")) && ((ccms._zone == "COSMOTE_APP_GIFTS4U") || (ccms._zone == "COSMOTE_APP_MORE4U"))) { |
| 4984 | 4991 | ||
| 4985 | if ((ccms._loyaltyCampaignId == "") || (ccms._loyaltyCampaignId == "NA")) { | 4992 | if ((ccms._loyaltyCampaignId == "") || (ccms._loyaltyCampaignId == "NA")) { |
| 4993 | + | ||
| 4994 | + let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | ||
| 4995 | + firebaseEvent._eventName = "loyalty_sdk_offer_selected" | ||
| 4996 | + firebaseEvent.setParameter = ("name", (ccms._title)) | ||
| 4997 | + firebaseEvent.setParameter = ("type", "gift") | ||
| 4998 | + SwiftEventBus.post("firebase", sender: firebaseEvent) | ||
| 4999 | + | ||
| 4986 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 5000 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
| 4987 | let vc = storyboard.instantiateViewController(withIdentifier: "ContextualViewController") as! SwiftWarplyFramework.ContextualViewController | 5001 | let vc = storyboard.instantiateViewController(withIdentifier: "ContextualViewController") as! SwiftWarplyFramework.ContextualViewController |
| 4988 | vc.ccms = ccms | 5002 | vc.ccms = ccms | ... | ... |
-
Please register or login to post a comment