AWSMobileAnalyticsEvent
Objective-C
@protocol AWSMobileAnalyticsEvent <NSObject>
Swift
protocol AWSMobileAnalyticsEvent : NSObjectProtocol
Represents the visit or conversion event of an A/B test, or may also be used to collect useful information in your application.
The example below demonstrates how to record view and conversion events. The @"level1Complete" event represents the view event,
and if the user makes a purchase, the code below records a @"level1UserBoughtUpgrade" event as the conversion event.
// get the event client from insights instance
id
// create the view event
id
// record the view event [eventClient recordEvent:level1Event];
// record if the user bought an upgrade (conversion)
if (userBoughtUpgrade) {
// create the conversion event
id
// record the conversion event
[eventClient recordEvent:boughtUpgradeEvent];
}
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) NSString* eventTypeSwift
var eventType: String! { get } -
Undocumented
Declaration
Objective-C
- (void)addAttribute:(NSString *)theValue forKey:(NSString *)theKey;Swift
func addAttribute(_ theValue: String!, forKey theKey: String!) -
Undocumented
Declaration
Objective-C
- (void)addMetric:(NSNumber *)theValue forKey:(NSString *)theKey;Swift
func addMetric(_ theValue: NSNumber!, forKey theKey: String!) -
Undocumented
Declaration
Objective-C
- (NSString *)attributeForKey:(NSString *)theKey;Swift
func attribute(forKey theKey: String!) -> String! -
Undocumented
Declaration
Objective-C
- (NSNumber *)metricForKey:(NSString *)theKey;Swift
func metric(forKey theKey: String!) -> NSNumber! -
Undocumented
Declaration
Objective-C
- (BOOL)hasAttributeForKey:(NSString *)theKey;Swift
func hasAttribute(forKey theKey: String!) -> Bool -
Undocumented
Declaration
Objective-C
- (BOOL)hasMetricForKey:(NSString *)theKey;Swift
func hasMetric(forKey theKey: String!) -> Bool -
Undocumented
Declaration
Objective-C
- (NSDictionary*) allAttributes;Swift
func allAttributes() -> [AnyHashable : Any]! -
Undocumented
Declaration
Objective-C
- (NSDictionary*) allMetrics;Swift
func allMetrics() -> [AnyHashable : Any]!
View on GitHub
Install in Dash
AWSMobileAnalyticsEvent Protocol Reference