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
Show 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
...
...
@@ -227,6 +227,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
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
vc
.
ccms
=
campaigns
[
indexPath
.
row
]
.
_ccms
...
...
@@ -244,6 +246,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
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"
firebaseEvent
.
setParameter
=
(
"name"
,
(
item
.
_title
))
...
...
@@ -273,6 +277,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"
firebaseEvent
.
setParameter
=
(
"name"
,
(
item
.
name
??
""
))
...
...
@@ -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
...
...
@@ -267,6 +267,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
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
vc
.
ccms
=
campaign
.
_ccms
...
...
@@ -284,6 +286,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
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"
firebaseEvent
.
setParameter
=
(
"name"
,
(
item
.
_title
))
...
...
@@ -312,6 +316,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"
firebaseEvent
.
setParameter
=
(
"name"
,
(
item
.
name
??
""
))
...
...
@@ -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
)
{
...
...
@@ -437,12 +441,17 @@ import SwiftEventBus
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
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
@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
...
...
@@ -5029,6 +5029,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"
firebaseEvent
.
setParameter
=
(
"name"
,
(
item
.
name
??
""
))
...
...
@@ -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
...
...
@@ -5083,6 +5087,8 @@ public class swiftApi {
if
((
ccms
.
_loyaltyCampaignId
==
""
)
||
(
ccms
.
_loyaltyCampaignId
==
"NA"
))
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Contextual:"
+
(
ccms
.
_sessionId
)))
let
firebaseEvent
=
swiftApi
.
LoyaltySDKFirebaseEventModel
()
firebaseEvent
.
_eventName
=
"loyalty_sdk_offer_selected"
firebaseEvent
.
setParameter
=
(
"name"
,
(
ccms
.
_title
))
...
...
@@ -5104,6 +5110,8 @@ public class swiftApi {
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
vc
.
campaignUrl
=
swiftApi
()
.
constructCcmsUrl
(
loyaltyCampaign
,
ccms
)
...
...
@@ -5117,6 +5125,8 @@ public class swiftApi {
}
else
if
(
isTelco
&&
(
loyaltyCampaign
.
session_uuid
==
ccms
.
_loyaltyCampaignId
))
{
swiftApi
()
.
logTrackersEvent
(
"click"
,
(
"Telco:"
+
(
ccms
.
_sessionId
)))
let
firebaseEvent
=
swiftApi
.
LoyaltySDKFirebaseEventModel
()
firebaseEvent
.
_eventName
=
"loyalty_sdk_offer_selected"
firebaseEvent
.
setParameter
=
(
"name"
,
(
ccms
.
_title
))
...
...
Please
register
or
login
to post a comment