Manos Chorianopoulos

Add unified_coupon_activated event to CampaignVC

...@@ -569,6 +569,37 @@ var timer2: DispatchSourceTimer? ...@@ -569,6 +569,37 @@ var timer2: DispatchSourceTimer?
569 firebaseEvent.setParameter = ("successful", successful) 569 firebaseEvent.setParameter = ("successful", successful)
570 SwiftEventBus.post("firebase", sender: firebaseEvent) 570 SwiftEventBus.post("firebase", sender: firebaseEvent)
571 571
572 + } else if (eventArray[1] == "unified_coupon_activated") {
573 + SwiftEventBus.post("unified_coupon_activated")
574 +
575 + var name: String = ""
576 + if (eventArray.count > 2) {
577 + name = String(eventArray[2])
578 + } else {
579 + name = ""
580 + }
581 +
582 + var type: String = ""
583 + if (eventArray.count > 3) {
584 + type = String(eventArray[3])
585 + } else {
586 + type = ""
587 + }
588 +
589 + var successful: String = ""
590 + if (eventArray.count > 4) {
591 + successful = String(eventArray[4])
592 + } else {
593 + successful = ""
594 + }
595 +
596 + let firebaseEvent = swiftApi.LoyaltySDKFirebaseEventModel()
597 + firebaseEvent._eventName = "unified_coupon_activated"
598 + firebaseEvent.setParameter = ("name", name)
599 + firebaseEvent.setParameter = ("type", type)
600 + firebaseEvent.setParameter = ("successful", successful)
601 + SwiftEventBus.post("firebase", sender: firebaseEvent)
602 +
572 } else if (eventArray[1] == "time_spent_on_loyalty_sdk") { 603 } else if (eventArray[1] == "time_spent_on_loyalty_sdk") {
573 var name: String = "" 604 var name: String = ""
574 if (eventArray.count > 2) { 605 if (eventArray.count > 2) {
......