ALEventService Class Reference

Inherits from NSObject
Declared in ALEventService.h

Overview

Service used for tracking various analytical events.

– setSuperProperty:forKey:

Set a super property to be recorded with all future events.

- (void)setSuperProperty:(nullable id)superProperty forKey:(NSString *)key

Parameters

superProperty

The super property value for the given super property key. Valid types include NSString, NSNumber, NSSDate, NSURL, NSArray, NSDictionary. Setting it to nil will remove that super property from being recorded with all future events.

key

The super property key for the given super property.

Discussion

Set a super property to be recorded with all future events.

If the property is set to nil, will remove that super property from being recorded with all future events.

Declared In

ALEventService.h

  superProperties

NSDictionary representing the currently set super properties that are passed up on events.

@property (nonatomic, copy, readonly) NSDictionary<NSString*id> *superProperties

Discussion

NSDictionary representing the currently set super properties that are passed up on events.

Declared In

ALEventService.h

– trackEvent:

Track an event without additional data.

- (void)trackEvent:(NSString *)eventName

Parameters

eventName

A string representing the event to track.

Discussion

Track an event without additional data.

Where applicable, it is suggested to use one of the predefined strings provided in ALEventTypes.h for the event and parameter key.

Declared In

ALEventService.h

– trackEvent:parameters:

Track an event with additional data.

- (void)trackEvent:(NSString *)eventName parameters:(nullable NSDictionary<NSString*,id> *)parameters

Parameters

eventName

A string representing the event to track.

parameters

A dictionary containing key-value pairs further describing this event.

Discussion

Track an event with additional data.

Where applicable, it is suggested to use one of the predefined strings provided in ALEventTypes.h for the event and parameter key.

Declared In

ALEventService.h

– trackInAppPurchaseWithTransactionIdentifier:parameters:

Track an in app purchase.

- (void)trackInAppPurchaseWithTransactionIdentifier:(NSString *)transactionIdentifier parameters:(nullable NSDictionary<NSString*,id> *)parameters

Parameters

transactionIdentifier

Value of [SKTransaction transactionIdentifier] property.

parameters

A dictionary containing key-value pairs further describing this event.

Discussion

Track an in app purchase.

Where applicable, it is suggested to use the pre-defined parameter keys provided in ALEventTypes.h. At a minimum, you should provide the following parameters: kALEventParameterProductIdentifierKey, kALEventParameterRevenueAmountKey, and kALEventParameterRevenueCurrencyKey. If you pass a value for kALEventParameterStoreKitReceiptKey, it will be used for validation. Otherwise, we will automatically collect [[NSBundle mainBundle] appStoreReceiptURL] and use it for validation.

Declared In

ALEventService.h

– trackCheckoutWithTransactionIdentifier:parameters:

Track a checkout / standard purchase.

- (void)trackCheckoutWithTransactionIdentifier:(nullable NSString *)transactionIdentifier parameters:(nullable NSDictionary<NSString*,id> *)parameters

Parameters

transactionIdentifier

An optional unique identifier for this transaction, as generated by you. For Apple Pay transactions, we suggest [PKPaymentToken transactionIdentifier] property.

parameters

A dictionary containing key-value pairs further describing this event.

Discussion

Track a checkout / standard purchase.

Where applicable, it is suggested to use the pre-defined parameter keys provided in ALEventTypes.h. At a minimum, you should provide the following parameters: kALEventParameterProductIdentifierKey, kALEventParameterRevenueAmountKey, and kALEventParameterRevenueCurrencyKey.

Declared In

ALEventService.h