@@ -12,36 +12,49 @@ import CoreLocation
1212/// The adobe analytics provider.
1313public class Adobe {
1414
15+ /// The name of the tracker.
1516 public let name = " Adobe Omniture "
1617
18+ /// The default initializer.
1719 public init ( ) { }
1820
21+ /// Starts tracking analytics.
1922 public func start( ) {
2023 ADBMobile . collectLifecycleData ( )
2124 }
2225
2326}
2427
25- extension Adobe : PageViewTracking {
26-
27- public func trackPageView( pageView: String , withAdditionalProperties properties: Properties ? ) -> TrackingResult {
28- ADBMobile . trackState ( pageView, data: properties)
29- return . Success
30- }
31-
32- }
28+ // MARK: - EventTracking
3329
3430extension Adobe : EventTracking {
3531
32+ /// Tracks the given event with optional additional properties.
33+ ///
34+ /// - Parameters:
35+ /// - event: The event to track.
36+ /// - properties: The optional additional properties.
37+ /// - Returns: A tracking result.
3638 public func trackEvent( event: String , withAdditionalProperties properties: Properties ? ) -> TrackingResult {
3739 ADBMobile . trackAction ( event, data: properties)
3840 return . Success
3941 }
40-
42+
4143}
4244
45+ // MARK: - LifetimeValueIncreasing
46+
4347extension Adobe : LifetimeValueIncreasing {
4448
49+ /**
50+ Increases the lifetime value of the key by the specified amount.
51+
52+ - parameter amount: The amount to increase that lifetime value for.
53+ - parameter item: The optional item to extend.
54+ - parameter properties: The optional additional properties.
55+
56+ - returns: A tracking result.
57+ */
4558 public func increaseLifetimeValue( byAmount amount: Double , forItem item: String ? , withAdditionalProperties properties: Properties ? ) -> TrackingResult {
4659 var data = properties ?? [ String: AnyObject] ( )
4760 if let item = item {
@@ -54,12 +67,40 @@ extension Adobe: LifetimeValueIncreasing {
5467
5568}
5669
70+ // MARK: - LocationTracking
71+
5772extension Adobe : LocationTracking {
5873
74+ /**
75+ Tracks location.
76+
77+ - parameter location: The location to track.
78+ - parameter properties: The optional additional properties.
79+
80+ - returns: A tracking result.
81+ */
5982 public func trackLocation( location: CLLocation ,
60- withAdditionalProperties properties: [ String : AnyObject ] ? ) -> TrackingResult {
61- ADBMobile . trackLocation ( location, data: properties)
62- return . Success
83+ withAdditionalProperties properties: [ String : AnyObject ] ? ) -> TrackingResult {
84+ ADBMobile . trackLocation ( location, data: properties)
85+ return . Success
86+ }
87+
88+ }
89+
90+ // MARK: - PageViewTracking
91+
92+ extension Adobe : PageViewTracking {
93+
94+ /**
95+ Tracks the page view.
96+
97+ - parameter pageView: The page view to track.
98+
99+ - returns: A tracking result.
100+ */
101+ public func trackPageView( pageView: String , withAdditionalProperties properties: Properties ? ) -> TrackingResult {
102+ ADBMobile . trackState ( pageView, data: properties)
103+ return . Success
63104 }
64105
65106}
0 commit comments