Manos Chorianopoulos

add trackers v3

......@@ -116,6 +116,7 @@ import SwiftEventBus
alert.addAction(UIAlertAction(title: "Ενεργοποίηση", style: .default, handler: { action in
switch action.style{
case .default:
swiftApi().logTrackersEvent("click", ("ActivateContextual:" + (self.ccms?._sessionId ?? "")))
self.submitOrderRequest()
case .cancel:
......
......@@ -274,6 +274,11 @@ import AVFoundation
// MARK: - Actions
@IBAction func redeemButtomAction(_ sender: Any) {
let couponSetData: swiftApi.CouponSetItemModel? = self.coupon?.couponset_data
let couponName = couponSetData?.name ?? ""
swiftApi().logTrackersEvent("click", ("ShareCoupon:" + couponName))
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "ShareViewController") as! SwiftWarplyFramework.ShareViewController
vc.coupon = self.coupon
......@@ -292,6 +297,8 @@ import AVFoundation
}
@IBAction func mapButtonAction(_ sender: Any) {
swiftApi().logTrackersEvent("click", "SeeShops")
let vc = SwiftWarplyFramework.MapsViewController(nibName: "MapsViewController", bundle: Bundle(for: MyEmptyClass.self))
vc.couponSet = coupon?.couponset_data
self.navigationController?.pushViewController(vc, animated: true)
......
......@@ -295,6 +295,8 @@ import SwiftEventBus
@IBAction func redeemButtomAction(_ sender: Any) {
// SwiftEventBus.post("couponRedeem", sender: coupon)
swiftApi().logTrackersEvent("click", ("RetrieveCoupon:" + (couponset?.uuid ?? "")))
redeemCouponSetRequest(uuid: couponset?.uuid ?? "", communication_uuid: campaign?.session_uuid ?? "")
// let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
......
......@@ -104,6 +104,8 @@ extension CouponsViewController: UITableViewDelegate, UITableViewDataSource{
print("Coupon Description clicked: " + (couponSetData?.short_description ?? ""))
print("Coupon Expiration clicked: " + (coupons[indexPath.row].expiration ?? ""))
swiftApi().logTrackersEvent("click", ("Coupon:" + (couponSetData?.name ?? "")))
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "CouponBarcodeViewController") as! SwiftWarplyFramework.CouponBarcodeViewController
vc.coupon = coupons[indexPath.row]
......
......@@ -115,12 +115,16 @@ import SwiftEventBus
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
if (index == 1) {
swiftApi().logTrackersEvent("click", ("LoyaltyHistoryScreen:" + "TabShared"))
let analysisVC = storyboard.instantiateViewController(withIdentifier:"SharingHistoryViewController") as! SwiftWarplyFramework.SharingHistoryViewController
analysisVC.index = index;
return analysisVC;
}
swiftApi().logTrackersEvent("click", ("LoyaltyHistoryScreen:" + "TabExpired"))
let analysisVC = storyboard.instantiateViewController(withIdentifier:"HistoryViewController") as! SwiftWarplyFramework.HistoryViewController
analysisVC.index = index;
......
......@@ -273,6 +273,9 @@ import MapKit
public func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView) {
let merchant = view.annotation as? MerchantAnnotation
let merchantModel = merchant!.model
swiftApi().logTrackersEvent("click", ("ShopsScreenMarker:" + (merchantModel._uuid)))
loadPinDetailsView(merchant!)
showPinDetailsView()
}
......
......@@ -169,6 +169,9 @@ import SwiftEventBus
alert.addAction(UIAlertAction(title: "Αποστολή", style: .default, handler: { action in
switch action.style{
case .default:
let couponSetData: swiftApi.CouponSetItemModel? = self.coupon?.couponset_data
let couponName = couponSetData?.name ?? ""
swiftApi().logTrackersEvent("click", ("ShareCoupon:" + couponName))
self.cosmoteCouponSharingRequest()
case .cancel:
......
......@@ -170,6 +170,7 @@ import SwiftEventBus
alert.addAction(UIAlertAction(title: "Ενεργοποίηση", style: .default, handler: { action in
switch action.style{
case .default:
swiftApi().logTrackersEvent("click", ("ActivateTelco:" + (self.ccms?._sessionId ?? "")))
self.submitOrderRequest()
case .cancel:
......