TealiumCollect Class Reference
Inherits from | NSObject |
---|---|
Declared in | TealiumCollect.h |
Overview
TealiumCollect is the main class for the Tealium Collect Library.
This defines the public API for sending & receiving data through collect and by default audience stream
Currently it is entirely exposed via class methods. This is done to allow flexabilitiy of changing the implementation. Currently it is implemented using a singleton instance of the library and sending messages to it’s instance methods. Internally the entire library runs inside its own serial queue so there is no need call TealiumCollect methods from a background thread, it takes care of that on its own.
+ enableWithConfiguration:
Starts the Tealium Collect Library with the given configuration object.
+ (void)enableWithConfiguration:(TEALCollectConfiguration *)configuration
Parameters
configuration |
TEALCollectConfiguration instance with valid Account/Profile/Enviroment properties. |
---|
Discussion
Starts the Tealium Collect Library with the given configuration object.
Declared In
TealiumCollect.h
+ enableWithConfiguration:completion:
Starts the Tealium Collect Library with the given configuration object.
+ (void)enableWithConfiguration:(TEALCollectConfiguration *)configuration completion:(TEALBooleanCompletionBlock)completion
Parameters
configuration |
TEALCollectConfiguration instance with valid Account/Profile/Enviroment properties. |
---|---|
completion |
TEALBooleanCompletionBlock which is called after settings have loaded and visitorID has been created or restored. |
Discussion
Starts the Tealium Collect Library with the given configuration object.
Declared In
TealiumCollect.h
+ disable
Disabled the library from operating. Sets the libraries internal state to disabled, all subsequent method calls with be ignored.
+ (void)disable
Discussion
Disabled the library from operating. Sets the libraries internal state to disabled, all subsequent method calls with be ignored.
Declared In
TealiumCollect.h
+ sendEventWithData:
Sends an event to Collect. Event are packaged with any custom key/value data sources passed in along with the default datasources provided by the library.
+ (void)sendEventWithData:(NSDictionary *)customData
Parameters
customData |
Dictionary of custom datasources (key/value pairs) to be included in the event dispatch. |
---|
Discussion
Sends an event to Collect. Event are packaged with any custom key/value data sources passed in along with the default datasources provided by the library.
Declared In
TealiumCollect.h
+ sendViewWithData:
Sends a view to Collect. Views are packaged with any custom key/value data sources passed in along with the default datasources provided by the library.
+ (void)sendViewWithData:(NSDictionary *)customData
Parameters
customData |
Dictionary of custom datasources (key/value pairs) to be included in the event dispatch. |
---|
Discussion
Sends a view to Collect. Views are packaged with any custom key/value data sources passed in along with the default datasources provided by the library.
Declared In
TealiumCollect.h
+ fetchVisitorProfileWithCompletion:
Retrieves the current visitor profile from AudienceStream.
+ (void)fetchVisitorProfileWithCompletion:(void ( ^ ) ( TEALVisitorProfile *profile , NSError *error ))completion
Parameters
completion |
Completion block with retrieved TEALVisitorProfile instance and an error should any problems occur. |
---|
Discussion
Retrieves the current visitor profile from AudienceStream.
Declared In
TealiumCollect.h
+ cachedVisitorProfileCopy
Last retrieved profile instance. This is updated every time the profile is queried. Depending on the settings the library was enabled with, this could be after every sendEvent:customData: call or only on explicit request.
+ (TEALVisitorProfile *)cachedVisitorProfileCopy
Return Value
Returns valid TEALVisitorProfile object. Its properties might be nil of nothing is loaded into them yet.
Discussion
Last retrieved profile instance. This is updated every time the profile is queried. Depending on the settings the library was enabled with, this could be after every sendEvent:customData: call or only on explicit request.
Declared In
TealiumCollect.h
+ visitorID
Unique visitor ID per Account / Device combination.
+ (NSString *)visitorID
Return Value
String value of the visitorID for the Account the library was enabled with.
Discussion
Unique visitor ID per Account / Device combination.
Declared In
TealiumCollect.h
+ joinTraceWithToken:
Joins a trace initiated from the AudienceStream web app with a valid string token provide from the TraceUI
+ (void)joinTraceWithToken:(NSString *)token
Parameters
token |
String value should match the code provided via the AudienceStream web UI. |
---|
Discussion
Joins a trace initiated from the AudienceStream web app with a valid string token provide from the TraceUI
Declared In
TealiumCollect.h
+ leaveTrace
Stops sending trace data for the provided token in the joinTraceWithToken: method.
+ (void)leaveTrace
Discussion
Stops sending trace data for the provided token in the joinTraceWithToken: method.
Declared In
TealiumCollect.h