Showing
5 changed files
with
44 additions
and
0 deletions
No preview for this file type
... | @@ -226,6 +226,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -226,6 +226,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ |
226 | firebaseEvent.setParameter = ("name", (campaigns[indexPath.row]._ccms?._title ?? "")) | 226 | firebaseEvent.setParameter = ("name", (campaigns[indexPath.row]._ccms?._title ?? "")) |
227 | firebaseEvent.setParameter = ("type", "gift") | 227 | firebaseEvent.setParameter = ("type", "gift") |
228 | SwiftEventBus.post("firebase", sender: firebaseEvent) | 228 | SwiftEventBus.post("firebase", sender: firebaseEvent) |
229 | + | ||
230 | + swiftApi().logTrackersEvent("click", ("Contextual:" + (campaigns[indexPath.row]._ccms?._sessionId ?? ""))) | ||
229 | 231 | ||
230 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 232 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
231 | let vc = storyboard.instantiateViewController(withIdentifier: "ContextualViewController") as! SwiftWarplyFramework.ContextualViewController | 233 | let vc = storyboard.instantiateViewController(withIdentifier: "ContextualViewController") as! SwiftWarplyFramework.ContextualViewController |
... | @@ -243,6 +245,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -243,6 +245,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ |
243 | if (loyaltyCampaignIdExists == true) { | 245 | if (loyaltyCampaignIdExists == true) { |
244 | for item in ccmsCampaigns { | 246 | for item in ccmsCampaigns { |
245 | if (item._loyaltyCampaignId == campaigns[indexPath.row].session_uuid) { | 247 | if (item._loyaltyCampaignId == campaigns[indexPath.row].session_uuid) { |
248 | + | ||
249 | + swiftApi().logTrackersEvent("click", ("Telco:" + (item._sessionId))) | ||
246 | 250 | ||
247 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | 251 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() |
248 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" | 252 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" |
... | @@ -272,6 +276,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -272,6 +276,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ |
272 | 276 | ||
273 | for item in couponsetsList { | 277 | for item in couponsetsList { |
274 | if (item.uuid == couponsetUuid) { | 278 | if (item.uuid == couponsetUuid) { |
279 | + | ||
280 | + swiftApi().logTrackersEvent("click", ("Loyalty:" + (campaigns[indexPath.row].session_uuid ?? ""))) | ||
275 | 281 | ||
276 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | 282 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() |
277 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" | 283 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" |
... | @@ -327,6 +333,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -327,6 +333,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ |
327 | ccmsCampaignFound = item | 333 | ccmsCampaignFound = item |
328 | } | 334 | } |
329 | } | 335 | } |
336 | + swiftApi().logTrackersEvent("click", ("Contextual:" + (ccmsCampaignFound._sessionId))) | ||
337 | + | ||
330 | url = swiftApi().constructCcmsUrl(campaigns[indexPath.row], ccmsCampaignFound) | 338 | url = swiftApi().constructCcmsUrl(campaigns[indexPath.row], ccmsCampaignFound) |
331 | params = swiftApi().constructCcmsParams(campaigns[indexPath.row], ccmsCampaignFound) | 339 | params = swiftApi().constructCcmsParams(campaigns[indexPath.row], ccmsCampaignFound) |
332 | 340 | ||
... | @@ -343,6 +351,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -343,6 +351,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ |
343 | print("CCMS_CLICK " + String(data: data, encoding: .utf8)!) | 351 | print("CCMS_CLICK " + String(data: data, encoding: .utf8)!) |
344 | 352 | ||
345 | } else { | 353 | } else { |
354 | + swiftApi().logTrackersEvent("click", ("Loyalty:" + (campaigns[indexPath.row].session_uuid ?? ""))) | ||
355 | + | ||
346 | url = swiftApi().constructCampaignUrl(campaigns[indexPath.row]) | 356 | url = swiftApi().constructCampaignUrl(campaigns[indexPath.row]) |
347 | params = swiftApi().constructCampaignParams(campaigns[indexPath.row]) | 357 | params = swiftApi().constructCampaignParams(campaigns[indexPath.row]) |
348 | 358 | ... | ... |
... | @@ -266,6 +266,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -266,6 +266,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ |
266 | firebaseEvent.setParameter = ("name", (campaign._ccms?._title ?? "")) | 266 | firebaseEvent.setParameter = ("name", (campaign._ccms?._title ?? "")) |
267 | firebaseEvent.setParameter = ("type", "gift") | 267 | firebaseEvent.setParameter = ("type", "gift") |
268 | SwiftEventBus.post("firebase", sender: firebaseEvent) | 268 | SwiftEventBus.post("firebase", sender: firebaseEvent) |
269 | + | ||
270 | + swiftApi().logTrackersEvent("click", ("Contextual:" + (campaign._ccms?._sessionId ?? ""))) | ||
269 | 271 | ||
270 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 272 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
271 | let vc = storyboard.instantiateViewController(withIdentifier: "ContextualViewController") as! SwiftWarplyFramework.ContextualViewController | 273 | let vc = storyboard.instantiateViewController(withIdentifier: "ContextualViewController") as! SwiftWarplyFramework.ContextualViewController |
... | @@ -283,6 +285,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -283,6 +285,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ |
283 | if (loyaltyCampaignIdExists == true) { | 285 | if (loyaltyCampaignIdExists == true) { |
284 | for item in ccmsCampaigns { | 286 | for item in ccmsCampaigns { |
285 | if (item._loyaltyCampaignId == campaign.session_uuid) { | 287 | if (item._loyaltyCampaignId == campaign.session_uuid) { |
288 | + | ||
289 | + swiftApi().logTrackersEvent("click", ("Telco:" + (item._sessionId))) | ||
286 | 290 | ||
287 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | 291 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() |
288 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" | 292 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" |
... | @@ -311,6 +315,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -311,6 +315,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ |
311 | 315 | ||
312 | for item in couponsetsList { | 316 | for item in couponsetsList { |
313 | if (item.uuid == couponsetUuid) { | 317 | if (item.uuid == couponsetUuid) { |
318 | + | ||
319 | + swiftApi().logTrackersEvent("click", ("Loyalty:" + (campaign.session_uuid ?? ""))) | ||
314 | 320 | ||
315 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | 321 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() |
316 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" | 322 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" |
... | @@ -372,6 +378,9 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -372,6 +378,9 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ |
372 | ccmsCampaignFound = item | 378 | ccmsCampaignFound = item |
373 | } | 379 | } |
374 | } | 380 | } |
381 | + | ||
382 | + swiftApi().logTrackersEvent("click", ("Contextual:" + (ccmsCampaignFound._sessionId))) | ||
383 | + | ||
375 | url = swiftApi().constructCcmsUrl(campaign, ccmsCampaignFound) | 384 | url = swiftApi().constructCcmsUrl(campaign, ccmsCampaignFound) |
376 | params = swiftApi().constructCcmsParams(campaign, ccmsCampaignFound) | 385 | params = swiftApi().constructCcmsParams(campaign, ccmsCampaignFound) |
377 | 386 | ||
... | @@ -388,6 +397,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -388,6 +397,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ |
388 | print("CCMS_CLICK " + String(data: data, encoding: .utf8)!) | 397 | print("CCMS_CLICK " + String(data: data, encoding: .utf8)!) |
389 | 398 | ||
390 | } else { | 399 | } else { |
400 | + swiftApi().logTrackersEvent("click", ("Loyalty:" + (campaign.session_uuid ?? ""))) | ||
401 | + | ||
391 | url = swiftApi().constructCampaignUrl(campaign) | 402 | url = swiftApi().constructCampaignUrl(campaign) |
392 | params = swiftApi().constructCampaignParams(campaign) | 403 | params = swiftApi().constructCampaignParams(campaign) |
393 | 404 | ... | ... |
... | @@ -415,6 +415,8 @@ import SwiftEventBus | ... | @@ -415,6 +415,8 @@ import SwiftEventBus |
415 | 415 | ||
416 | // MARK: - Actions | 416 | // MARK: - Actions |
417 | @IBAction func qustionnaireButtonAction(_ sender: Any) { | 417 | @IBAction func qustionnaireButtonAction(_ sender: Any) { |
418 | + swiftApi().logTrackersEvent("click", ("LoyaltyWalletScreen:" + "Questionnaire")) | ||
419 | + | ||
418 | swiftApi().openQuestionnaire(self); | 420 | swiftApi().openQuestionnaire(self); |
419 | } | 421 | } |
420 | 422 | ||
... | @@ -429,6 +431,8 @@ import SwiftEventBus | ... | @@ -429,6 +431,8 @@ import SwiftEventBus |
429 | firebaseEvent._eventName = "did_tap_gifts_for_you_badge" | 431 | firebaseEvent._eventName = "did_tap_gifts_for_you_badge" |
430 | firebaseEvent.setParameter = ("screen", "Loyalty Wallet") | 432 | firebaseEvent.setParameter = ("screen", "Loyalty Wallet") |
431 | SwiftEventBus.post("firebase", sender: firebaseEvent) | 433 | SwiftEventBus.post("firebase", sender: firebaseEvent) |
434 | + | ||
435 | + swiftApi().logTrackersEvent("click", ("LoyaltyWalletScreen:" + "DealsBanner")) | ||
432 | } | 436 | } |
433 | @IBAction func couponEarnButtonAction(_ sender: Any) { | 437 | @IBAction func couponEarnButtonAction(_ sender: Any) { |
434 | 438 | ||
... | @@ -436,6 +440,8 @@ import SwiftEventBus | ... | @@ -436,6 +440,8 @@ import SwiftEventBus |
436 | firebaseEvent._eventName = "did_tap_deals_for_you_badge" | 440 | firebaseEvent._eventName = "did_tap_deals_for_you_badge" |
437 | firebaseEvent.setParameter = ("screen", "Loyalty Wallet") | 441 | firebaseEvent.setParameter = ("screen", "Loyalty Wallet") |
438 | SwiftEventBus.post("firebase", sender: firebaseEvent) | 442 | SwiftEventBus.post("firebase", sender: firebaseEvent) |
443 | + | ||
444 | + swiftApi().logTrackersEvent("click", ("LoyaltyWalletScreen:" + "LoyaltyBanner")) | ||
439 | 445 | ||
440 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 446 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
441 | let vc = storyboard.instantiateViewController(withIdentifier: "LoyaltyAnalysisViewController") as! SwiftWarplyFramework.LoyaltyAnalysisViewController | 447 | let vc = storyboard.instantiateViewController(withIdentifier: "LoyaltyAnalysisViewController") as! SwiftWarplyFramework.LoyaltyAnalysisViewController |
... | @@ -443,6 +449,9 @@ import SwiftEventBus | ... | @@ -443,6 +449,9 @@ import SwiftEventBus |
443 | } | 449 | } |
444 | @IBAction func activeCodeButtonAction(_ sender: Any) { | 450 | @IBAction func activeCodeButtonAction(_ sender: Any) { |
445 | print("Active DFY coupon banner Tapped!") | 451 | print("Active DFY coupon banner Tapped!") |
452 | + | ||
453 | + swiftApi().logTrackersEvent("click", ("LoyaltyWalletScreen:" + "ActiveDealsBanner")) | ||
454 | + | ||
446 | let couponDetails = swiftApi.ActiveDFYCouponEventModel() | 455 | let couponDetails = swiftApi.ActiveDFYCouponEventModel() |
447 | couponDetails._isPressed = true | 456 | couponDetails._isPressed = true |
448 | SwiftEventBus.post("dfy_coupon_details", sender: couponDetails) | 457 | SwiftEventBus.post("dfy_coupon_details", sender: couponDetails) |
... | @@ -476,6 +485,10 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{ | ... | @@ -476,6 +485,10 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{ |
476 | 485 | ||
477 | public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | 486 | public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
478 | 487 | ||
488 | + let couponSetData: swiftApi.CouponSetItemModel? = coupons[indexPath.row].couponset_data | ||
489 | + let couponName = couponSetData?.name ?? "" | ||
490 | + swiftApi().logTrackersEvent("click", ("Coupon:" + couponName)) | ||
491 | + | ||
479 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 492 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
480 | let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! SwiftWarplyFramework.CouponBarcodeViewController | 493 | let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! SwiftWarplyFramework.CouponBarcodeViewController |
481 | vc.coupon = coupons[indexPath.row] | 494 | vc.coupon = coupons[indexPath.row] | ... | ... |
... | @@ -5028,6 +5028,8 @@ public class swiftApi { | ... | @@ -5028,6 +5028,8 @@ public class swiftApi { |
5028 | 5028 | ||
5029 | for item in couponsetsList { | 5029 | for item in couponsetsList { |
5030 | if (item.uuid == couponsetUuid) { | 5030 | if (item.uuid == couponsetUuid) { |
5031 | + | ||
5032 | + swiftApi().logTrackersEvent("click", ("Loyalty:" + (campaign.session_uuid ?? ""))) | ||
5031 | 5033 | ||
5032 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | 5034 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() |
5033 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" | 5035 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" |
... | @@ -5051,6 +5053,8 @@ public class swiftApi { | ... | @@ -5051,6 +5053,8 @@ public class swiftApi { |
5051 | } | 5053 | } |
5052 | 5054 | ||
5053 | } else { | 5055 | } else { |
5056 | + swiftApi().logTrackersEvent("click", ("Loyalty:" + (campaign.session_uuid ?? ""))) | ||
5057 | + | ||
5054 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 5058 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
5055 | let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! SwiftWarplyFramework.CampaignViewController | 5059 | let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! SwiftWarplyFramework.CampaignViewController |
5056 | 5060 | ||
... | @@ -5082,6 +5086,8 @@ public class swiftApi { | ... | @@ -5082,6 +5086,8 @@ public class swiftApi { |
5082 | // if (((ccms._loyaltyCampaignId == "") || (ccms._loyaltyCampaignId == "NA")) && ((ccms._zone == "COSMOTE_APP_GIFTS4U") || (ccms._zone == "COSMOTE_APP_MORE4U"))) { | 5086 | // if (((ccms._loyaltyCampaignId == "") || (ccms._loyaltyCampaignId == "NA")) && ((ccms._zone == "COSMOTE_APP_GIFTS4U") || (ccms._zone == "COSMOTE_APP_MORE4U"))) { |
5083 | 5087 | ||
5084 | if ((ccms._loyaltyCampaignId == "") || (ccms._loyaltyCampaignId == "NA")) { | 5088 | if ((ccms._loyaltyCampaignId == "") || (ccms._loyaltyCampaignId == "NA")) { |
5089 | + | ||
5090 | + swiftApi().logTrackersEvent("click", ("Contextual:" + (ccms._sessionId))) | ||
5085 | 5091 | ||
5086 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | 5092 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() |
5087 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" | 5093 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" |
... | @@ -5103,6 +5109,8 @@ public class swiftApi { | ... | @@ -5103,6 +5109,8 @@ public class swiftApi { |
5103 | let isTelco = (loyaltyCampaign._type != nil && loyaltyCampaign._type == "telco") | 5109 | let isTelco = (loyaltyCampaign._type != nil && loyaltyCampaign._type == "telco") |
5104 | 5110 | ||
5105 | if (isCcmsOffer && (loyaltyCampaign.session_uuid == ccms._loyaltyCampaignId)) { | 5111 | if (isCcmsOffer && (loyaltyCampaign.session_uuid == ccms._loyaltyCampaignId)) { |
5112 | + | ||
5113 | + swiftApi().logTrackersEvent("click", ("Contextual:" + (ccms._sessionId))) | ||
5106 | 5114 | ||
5107 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | 5115 | let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) |
5108 | let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! SwiftWarplyFramework.CampaignViewController | 5116 | let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! SwiftWarplyFramework.CampaignViewController |
... | @@ -5116,6 +5124,8 @@ public class swiftApi { | ... | @@ -5116,6 +5124,8 @@ public class swiftApi { |
5116 | break; | 5124 | break; |
5117 | 5125 | ||
5118 | } else if (isTelco && (loyaltyCampaign.session_uuid == ccms._loyaltyCampaignId)) { | 5126 | } else if (isTelco && (loyaltyCampaign.session_uuid == ccms._loyaltyCampaignId)) { |
5127 | + | ||
5128 | + swiftApi().logTrackersEvent("click", ("Telco:" + (ccms._sessionId))) | ||
5119 | 5129 | ||
5120 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() | 5130 | let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel() |
5121 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" | 5131 | firebaseEvent._eventName = "loyalty_sdk_offer_selected" | ... | ... |
-
Please register or login to post a comment