public final class Tealium
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Tealium.Config
Configuration for Tealium
|
Modifier and Type | Method and Description |
---|---|
void |
addRemoteCommand(RemoteCommand remoteCommand)
Add a remote command after Tealium has been initialized.
|
static Tealium |
createInstance(java.lang.String key,
Tealium.Config config)
Create a new Tealium Multiton
Instances are accessible by
getInstance(String) and destroyable by destroyInstance(String) |
static void |
destroyInstance(java.lang.String key)
Destroy an active Tealium instance created by
createInstance(String, Config) |
void |
disableConsentManager()
Disable consent manager
|
java.lang.String |
getAccountName() |
VisitorProfile |
getCachedVisitorProfile() |
ConsentManager |
getConsentManager() |
java.lang.String |
getDatasourceId() |
DataSources |
getDataSources() |
java.lang.String |
getEnvironmentName() |
static Tealium |
getInstance(java.lang.String key)
Get a Tealium instance created by
createInstance(String, Config) |
java.lang.String |
getProfileName() |
void |
joinTrace(java.lang.String traceId)
Join an active trace
|
void |
leaveTrace()
Leave an active trace
|
void |
removeRemoteCommand(RemoteCommand remoteCommand)
Remove a previously added remote command after Tealium has been initialized.
|
void |
track(java.util.Map<java.lang.String,?> data)
(Advanced) Track data
|
void |
trackEvent(java.lang.String eventTitle,
java.util.Map<java.lang.String,?> data)
Track an event (such as a button click)
|
void |
trackEventType(java.lang.String eventType,
java.lang.String eventTitle,
java.util.Map<java.lang.String,?> data)
Track a Custom Event Type
|
void |
trackView(java.lang.String screenTitle,
java.util.Map<java.lang.String,?> data)
Track a presented view
|
public java.lang.String getAccountName()
Tealium.Config.create(Application, String, String, String)
public java.lang.String getProfileName()
Tealium.Config.create(Application, String, String, String)
public java.lang.String getEnvironmentName()
Tealium.Config.create(Application, String, String, String)
public java.lang.String getDatasourceId()
Tealium.Config.setDatasourceId(String)
public ConsentManager getConsentManager()
Tealium.Config.enableConsentManager(String)
()}public void disableConsentManager()
public void trackView(java.lang.String screenTitle, java.util.Map<java.lang.String,?> data)
screenTitle
- the view's screen title which will be mapped to DataSources.Key.SCREEN_TITLE
or nulldata
- any additional data to be added to the data layer or nullpublic void trackEvent(java.lang.String eventTitle, java.util.Map<java.lang.String,?> data)
eventTitle
- the event's id which will be mapped to DataSources.Key.LINK_ID
or nulldata
- any additional data to be added to the data layer or nullpublic void trackEventType(java.lang.String eventType, java.lang.String eventTitle, java.util.Map<java.lang.String,?> data)
eventType
- event type label to be mapped to DataSources.Key.TEALIUM_EVENT_TYPE
eventTitle
- the title given to the event which will be mapped to DataSources.Key.TEALIUM_EVENT
public void track(java.util.Map<java.lang.String,?> data)
data
- contextual data or null#trackView(String, Map)} or {@link #trackEvent(String, Map)}
public void joinTrace(java.lang.String traceId)
traceId
- the active trace idpublic void addRemoteCommand(RemoteCommand remoteCommand)
remoteCommand
- a remoteCommand instance.java.lang.IllegalArgumentException
- when remoteCommand is null.public void removeRemoteCommand(RemoteCommand remoteCommand)
remoteCommand
- a remoteCommand instance.java.lang.IllegalArgumentException
- when remoteCommand is null.public void leaveTrace()
public DataSources getDataSources()
DataSources
for this instancepublic VisitorProfile getCachedVisitorProfile()
VisitorProfile
or null if never fetchedpublic static Tealium createInstance(java.lang.String key, Tealium.Config config)
getInstance(String)
and destroyable by destroyInstance(String)
key
- the identifier for the new Tealium instanceconfig
- the configuration for the new instancepublic static Tealium getInstance(java.lang.String key)
createInstance(String, Config)
key
- the key used to create the instancepublic static void destroyInstance(java.lang.String key)
createInstance(String, Config)
key
- used to create the instance