WLAnalytics Class Reference
| Inherits from | NSObject |
| Declared in | WLAnalytics.h |
Instance Methods
addDeviceEventListener:
This method adds a DeviceEvent for Analytics to collect
- (void)addDeviceEventListener:(DeviceEvent)deviceEventParameters
- deviceEvent
the DeviceEvent to collect
Declared In
WLAnalytics.hdisable
This method disables capturing of analytics log data
- (void)disableAvailability
IBM Worklight V6.2.0
Declared In
WLAnalytics.henable
This method enables capturing of analytics log data
- (void)enableAvailability
IBM Worklight V6.2.0
Declared In
WLAnalytics.hlog:withMetadata:
This method logs analytics data Some data is already captured by the framework. To avoid collisions, the following keys will be excluded if logged in the metadata: appID appLabel appVersion appVersionCode appName appVersion deviceBrand deviceOSversion deviceOS deviceModel deviceID timezone timestamp
- (void)log:(NSString *)message withMetadata:(NSDictionary *)metadataParameters
- metadata
Dictionary containing metadata to append to the log output
- String
message to be logged
Availability
Worklight V6.2.0
Declared In
WLAnalytics.hremoveDeviceEventListener:
Disable analytics from collecting the specified DeviceEvent
- (void)removeDeviceEventListener:(DeviceEvent)deviceEventParameters
- deviceEvent
the DeviceEvent to remove
Declared In
WLAnalytics.hsend
This method sends the log file when the log buffer exists and is not empty.
- (void)sendAvailability
IBM Worklight V6.2.0
Declared In
WLAnalytics.hsendWithDelegate:
This method is the same as send, with the addition of a delegate that is notified when the send request succeeds or fails.
- (void)sendWithDelegate:(id<WLDelegate>)userSendAnalyticsDelegateParameters
- userSendAnalyticsDelegate
WLDelegate that handles the result of the send request with the onSuccess and onFailure methods.
Availability
IBM MobileFirst Platform V7.0.0
See Also
Declared In
WLAnalytics.hsetUserContext:
Specify current application user. If you want user-based analytics, you must use this method call. For example, use it when the user logs in, and call the unsetUserContext method when the user logs out. Or if your application supports user profiles, call this method when the user profile changes.
- (void)setUserContext:(NSString *)userParameters
- user
the user name of the current user.
Declared In
WLAnalytics.h