public final class TealiumCollect
extends java.lang.Object
enable(TealiumCollect.Config)
must be called before using any of the other methods.Modifier and Type | Class and Description |
---|---|
static class |
TealiumCollect.Config
Required to enable the TealiumCollect library.
|
static interface |
TealiumCollect.OnAudienceUpdateListener
Implementers of this class can subscribe to Audience updates by adding the listener to
getEventListeners() . |
static interface |
TealiumCollect.OnBadgeUpdateListener
Implementers of this class can subscribe to Badge updates by adding the listener to
getEventListeners() |
static interface |
TealiumCollect.OnDateUpdateListener
Implementers of this class can subscribe to Date updates by adding the listener to
getEventListeners() |
static interface |
TealiumCollect.OnFlagUpdateListener
Implementers of this class can subscribe to Flag updates by adding the listener to
getEventListeners() |
static interface |
TealiumCollect.OnMetricUpdateListener
Implementers of this class can subscribe to Metric updates by adding the listener to
getEventListeners() |
static interface |
TealiumCollect.OnProfileUpdatedListener
Implementers of this class can subscribe to Profile updates by adding the listener to
getEventListeners() |
static interface |
TealiumCollect.OnPropertyUpdateListener
Implementers of this class can subscribe to Property (AKA Trait) updates by adding the listener to
getEventListeners() |
Modifier and Type | Method and Description |
---|---|
static void |
disable()
Disable the initialized library.
|
static void |
enable(TealiumCollect.Config config)
Initialize the library with the desired configuration.
|
static VisitorProfile |
getCachedVisitorProfile() |
static java.util.Collection<java.util.EventListener> |
getEventListeners()
Add an
EventListener to receive profile update events. |
static java.lang.String |
getVisitorId() |
static boolean |
isEnabled() |
static void |
joinTrace(java.lang.String traceId)
Join an AudienceStream Trace with the given trace id.
|
static void |
leaveTrace()
Leave an active AudienceStream Trace if one is running.
|
static void |
send(java.util.Map<java.lang.String,?> data)
Send a custom dispatch to TealiumCollect.
|
static void |
sendEvent(java.util.Map<java.lang.String,?> data)
Send an event dispatch to Tealium Collect.
|
static void |
sendView(java.util.Map<java.lang.String,?> data)
Send a view dispatch to Tealium Collect.
|
public static java.util.Collection<java.util.EventListener> getEventListeners()
EventListener
to receive profile update events.
The EventListeners that receive events are:
public static boolean isEnabled()
enable(Config)
has been called).public static void enable(TealiumCollect.Config config)
config
- a Config instance. If null or the library is already initialized, a warning
will be logged in LogCat and the call will have no effect.public static void disable()
public static void sendEvent(java.util.Map<java.lang.String,?> data)
send(String, Map)
with the first argument as "link" along with the
given data.data
- the data tied to this event. The values provided by the map are copied into
String
s, org.json.JSONArray
s, and org.json.JSONObject
s
depending on their original type.public static void sendView(java.util.Map<java.lang.String,?> data)
send(String, Map)
with the first argument as "view" along with thedata
- the data tied to this event. The values provided by the map are copied into
String
s, org.json.JSONArray
s, and org.json.JSONObject
s
depending on their original type.public static void send(java.util.Map<java.lang.String,?> data)
data
- the data tied to this event. The values provided by the map are copied into
String
s, org.json.JSONArray
s, and org.json.JSONObject
s
depending on their original type.TealiumCollect#sendEvent(java.util.Map)}.
,
TealiumCollect#sendView(java.util.Map)}.
public static void joinTrace(java.lang.String traceId)
traceId
- Given trace id, typically a 5-digit numerical string.public static void leaveTrace()
public static VisitorProfile getCachedVisitorProfile()
public static java.lang.String getVisitorId()