Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2022-10-14 11:41:40 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
11f15ba4016a53ea69871d661f2227ea6dfeb7b7
11f15ba4
1 parent
4d70d529
add trackers final
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/MFYViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
11f15ba
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
View file @
11f15ba
...
...
@@ -226,6 +226,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
firebaseEvent
.
setParameter
=
(
"name"
,
(
campaigns
[
indexPath
.
row
]
.
_ccms
?
.
_title
??
""
))
firebaseEvent
.
setParameter
=
(
"type"
,
"gift"
)
SwiftEventBus
.
post
(
"firebase"
,
sender
:
firebaseEvent
)
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Contextual:"
+
(
campaigns
[
indexPath
.
row
]
.
_ccms
?
.
_sessionId
??
""
)))
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"ContextualViewController"
)
as!
SwiftWarplyFramework
.
ContextualViewController
...
...
@@ -243,6 +245,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
if
(
loyaltyCampaignIdExists
==
true
)
{
for
item
in
ccmsCampaigns
{
if
(
item
.
_loyaltyCampaignId
==
campaigns
[
indexPath
.
row
]
.
session_uuid
)
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Telco:"
+
(
item
.
_sessionId
)))
let
firebaseEvent
=
swiftApi
.
LoyaltySDKFirebaseEventModel
()
firebaseEvent
.
_eventName
=
"loyalty_sdk_offer_selected"
...
...
@@ -272,6 +276,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
for
item
in
couponsetsList
{
if
(
item
.
uuid
==
couponsetUuid
)
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Loyalty:"
+
(
campaigns
[
indexPath
.
row
]
.
session_uuid
??
""
)))
let
firebaseEvent
=
swiftApi
.
LoyaltySDKFirebaseEventModel
()
firebaseEvent
.
_eventName
=
"loyalty_sdk_offer_selected"
...
...
@@ -327,6 +333,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
ccmsCampaignFound
=
item
}
}
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Contextual:"
+
(
ccmsCampaignFound
.
_sessionId
)))
url
=
swiftApi
()
.
constructCcmsUrl
(
campaigns
[
indexPath
.
row
],
ccmsCampaignFound
)
params
=
swiftApi
()
.
constructCcmsParams
(
campaigns
[
indexPath
.
row
],
ccmsCampaignFound
)
...
...
@@ -343,6 +351,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
print
(
"CCMS_CLICK "
+
String
(
data
:
data
,
encoding
:
.
utf8
)
!
)
}
else
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Loyalty:"
+
(
campaigns
[
indexPath
.
row
]
.
session_uuid
??
""
)))
url
=
swiftApi
()
.
constructCampaignUrl
(
campaigns
[
indexPath
.
row
])
params
=
swiftApi
()
.
constructCampaignParams
(
campaigns
[
indexPath
.
row
])
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MFYViewController.swift
View file @
11f15ba
...
...
@@ -266,6 +266,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
firebaseEvent
.
setParameter
=
(
"name"
,
(
campaign
.
_ccms
?
.
_title
??
""
))
firebaseEvent
.
setParameter
=
(
"type"
,
"gift"
)
SwiftEventBus
.
post
(
"firebase"
,
sender
:
firebaseEvent
)
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Contextual:"
+
(
campaign
.
_ccms
?
.
_sessionId
??
""
)))
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"ContextualViewController"
)
as!
SwiftWarplyFramework
.
ContextualViewController
...
...
@@ -283,6 +285,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
if
(
loyaltyCampaignIdExists
==
true
)
{
for
item
in
ccmsCampaigns
{
if
(
item
.
_loyaltyCampaignId
==
campaign
.
session_uuid
)
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Telco:"
+
(
item
.
_sessionId
)))
let
firebaseEvent
=
swiftApi
.
LoyaltySDKFirebaseEventModel
()
firebaseEvent
.
_eventName
=
"loyalty_sdk_offer_selected"
...
...
@@ -311,6 +315,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
for
item
in
couponsetsList
{
if
(
item
.
uuid
==
couponsetUuid
)
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Loyalty:"
+
(
campaign
.
session_uuid
??
""
)))
let
firebaseEvent
=
swiftApi
.
LoyaltySDKFirebaseEventModel
()
firebaseEvent
.
_eventName
=
"loyalty_sdk_offer_selected"
...
...
@@ -372,6 +378,9 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
ccmsCampaignFound
=
item
}
}
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Contextual:"
+
(
ccmsCampaignFound
.
_sessionId
)))
url
=
swiftApi
()
.
constructCcmsUrl
(
campaign
,
ccmsCampaignFound
)
params
=
swiftApi
()
.
constructCcmsParams
(
campaign
,
ccmsCampaignFound
)
...
...
@@ -388,6 +397,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
print
(
"CCMS_CLICK "
+
String
(
data
:
data
,
encoding
:
.
utf8
)
!
)
}
else
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Loyalty:"
+
(
campaign
.
session_uuid
??
""
)))
url
=
swiftApi
()
.
constructCampaignUrl
(
campaign
)
params
=
swiftApi
()
.
constructCampaignParams
(
campaign
)
...
...
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
View file @
11f15ba
...
...
@@ -415,6 +415,8 @@ import SwiftEventBus
// MARK: - Actions
@IBAction
func
qustionnaireButtonAction
(
_
sender
:
Any
)
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"LoyaltyWalletScreen:"
+
"Questionnaire"
))
swiftApi
()
.
openQuestionnaire
(
self
);
}
...
...
@@ -429,6 +431,8 @@ import SwiftEventBus
firebaseEvent
.
_eventName
=
"did_tap_gifts_for_you_badge"
firebaseEvent
.
setParameter
=
(
"screen"
,
"Loyalty Wallet"
)
SwiftEventBus
.
post
(
"firebase"
,
sender
:
firebaseEvent
)
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"LoyaltyWalletScreen:"
+
"DealsBanner"
))
}
@IBAction
func
couponEarnButtonAction
(
_
sender
:
Any
)
{
...
...
@@ -436,6 +440,8 @@ import SwiftEventBus
firebaseEvent
.
_eventName
=
"did_tap_deals_for_you_badge"
firebaseEvent
.
setParameter
=
(
"screen"
,
"Loyalty Wallet"
)
SwiftEventBus
.
post
(
"firebase"
,
sender
:
firebaseEvent
)
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"LoyaltyWalletScreen:"
+
"LoyaltyBanner"
))
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"LoyaltyAnalysisViewController"
)
as!
SwiftWarplyFramework
.
LoyaltyAnalysisViewController
...
...
@@ -443,6 +449,9 @@ import SwiftEventBus
}
@IBAction
func
activeCodeButtonAction
(
_
sender
:
Any
)
{
print
(
"Active DFY coupon banner Tapped!"
)
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"LoyaltyWalletScreen:"
+
"ActiveDealsBanner"
))
let
couponDetails
=
swiftApi
.
ActiveDFYCouponEventModel
()
couponDetails
.
_isPressed
=
true
SwiftEventBus
.
post
(
"dfy_coupon_details"
,
sender
:
couponDetails
)
...
...
@@ -476,6 +485,10 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
public
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
let
couponSetData
:
swiftApi
.
CouponSetItemModel
?
=
coupons
[
indexPath
.
row
]
.
couponset_data
let
couponName
=
couponSetData
?
.
name
??
""
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Coupon:"
+
couponName
))
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"CouponBarcodeViewController"
)
as!
SwiftWarplyFramework
.
CouponBarcodeViewController
vc
.
coupon
=
coupons
[
indexPath
.
row
]
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
11f15ba
...
...
@@ -5028,6 +5028,8 @@ public class swiftApi {
for
item
in
couponsetsList
{
if
(
item
.
uuid
==
couponsetUuid
)
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Loyalty:"
+
(
campaign
.
session_uuid
??
""
)))
let
firebaseEvent
=
swiftApi
.
LoyaltySDKFirebaseEventModel
()
firebaseEvent
.
_eventName
=
"loyalty_sdk_offer_selected"
...
...
@@ -5051,6 +5053,8 @@ public class swiftApi {
}
}
else
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Loyalty:"
+
(
campaign
.
session_uuid
??
""
)))
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"CampaignViewController"
)
as!
SwiftWarplyFramework
.
CampaignViewController
...
...
@@ -5082,6 +5086,8 @@ public class swiftApi {
// if (((ccms._loyaltyCampaignId == "") || (ccms._loyaltyCampaignId == "NA")) && ((ccms._zone == "COSMOTE_APP_GIFTS4U") || (ccms._zone == "COSMOTE_APP_MORE4U"))) {
if
((
ccms
.
_loyaltyCampaignId
==
""
)
||
(
ccms
.
_loyaltyCampaignId
==
"NA"
))
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Contextual:"
+
(
ccms
.
_sessionId
)))
let
firebaseEvent
=
swiftApi
.
LoyaltySDKFirebaseEventModel
()
firebaseEvent
.
_eventName
=
"loyalty_sdk_offer_selected"
...
...
@@ -5103,6 +5109,8 @@ public class swiftApi {
let
isTelco
=
(
loyaltyCampaign
.
_type
!=
nil
&&
loyaltyCampaign
.
_type
==
"telco"
)
if
(
isCcmsOffer
&&
(
loyaltyCampaign
.
session_uuid
==
ccms
.
_loyaltyCampaignId
))
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Contextual:"
+
(
ccms
.
_sessionId
)))
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"CampaignViewController"
)
as!
SwiftWarplyFramework
.
CampaignViewController
...
...
@@ -5116,6 +5124,8 @@ public class swiftApi {
break
;
}
else
if
(
isTelco
&&
(
loyaltyCampaign
.
session_uuid
==
ccms
.
_loyaltyCampaignId
))
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Telco:"
+
(
ccms
.
_sessionId
)))
let
firebaseEvent
=
swiftApi
.
LoyaltySDKFirebaseEventModel
()
firebaseEvent
.
_eventName
=
"loyalty_sdk_offer_selected"
...
...
Please
register
or
login
to post a comment