public class Tracker
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Tracker.IdentifierType
Enum for different identifier
|
static class |
Tracker.OfflineMode
Enum for different offline mode
|
static class |
Tracker.PluginKey
Enum for different plugin
|
static class |
Tracker.UUIDExpirationMode
Enum for different UUID Expiration mode
|
Constructor and Description |
---|
Tracker()
Initialisation with default configuration
|
Tracker(android.content.Context context)
Initialisation with default configuration
|
Tracker(android.content.Context context,
java.util.HashMap<java.lang.String,java.lang.Object> configuration)
Initialisation with a custom configuration
|
Tracker(java.util.HashMap<java.lang.String,java.lang.Object> configuration)
Initialisation with a custom configuration
|
Modifier and Type | Method and Description |
---|---|
Aisles |
Aisles()
Deprecated.
Since 2.3.0, Aisles is now only available as a screen object property.
|
AVInsights |
AVInsights() |
Campaigns |
Campaigns()
Get Campaigns instance
|
Cart |
Cart()
Get Cart instance
|
Context |
Context()
Get Context instance
|
TrackerListener |
createDefaultTrackerListener()
Create a default listener
|
CustomObjects |
CustomObjects()
Get CustomObjects instance
|
CustomTreeStructures |
CustomTreeStructures()
Deprecated.
Since 2.3.0, CustomTreeStructure is now only available as a screen object property.
|
CustomVars |
CustomVars()
Deprecated.
Since 2.3.0, CustomVars is now only available as a screen object property.
|
void |
delProp(java.lang.String key)
remove property from the hit
|
void |
delProps()
remove properties from the hit
|
void |
dispatch()
Sends all tracking objects added
|
static void |
doNotTrack(boolean enabled)
Deprecated.
please use
optOut(boolean) instead |
static boolean |
doNotTrackEnabled()
Deprecated.
please use
optOutEnabled() instead |
DynamicScreens |
DynamicScreens()
Get DynamicScreens instance
|
ECommerce |
ECommerce() |
Events |
Events() |
Gestures |
Gestures()
Get Gestures instance
|
java.util.LinkedHashMap<java.lang.String,BusinessObject> |
getBusinessObjects() |
Configuration |
getConfiguration()
Get the current tracker configuration
|
java.util.Map<java.lang.String,java.lang.String> |
getCrashInformation()
Get crash informations saved
|
java.util.Map<java.lang.String,java.lang.Object> |
getLifecycleMetrics()
Get lifecycle metrics computed by SDK
|
TrackerListener |
getListener()
Get the current tracker listener
|
Param |
getProp(java.lang.String key)
Get a property
|
java.util.List<Param> |
getProps()
Get all properties
|
java.lang.String |
getSdkVersion()
Get SDK version
|
void |
getUserId(UserIdCallback callback)
Asynchronous method to get user ID
|
java.lang.String |
getUserIdSync()
Get user id (require one hit sent)
|
IdentifiedVisitor |
IdentifiedVisitor()
Get IdentifiedVisitor instance
|
InternalSearches |
InternalSearches()
Deprecated.
Since 2.3.0, InternalSearch is now only available as a screen or gesture object property.
|
Locations |
Locations()
Deprecated.
Since 2.3.0, Location is now only available as a screen object property.
|
MvTestings |
MvTestings()
Get MvTestings instance
|
NuggAds |
NuggAds()
Get NuggAd instance
|
Offline |
Offline()
Get Offline instance
|
static void |
optOut(boolean enabled)
Deprecated.
please use the same method in ATInternet class instead
|
static boolean |
optOutEnabled()
Deprecated.
please use the same method in ATInternet class instead
|
Orders |
Orders()
Get Orders instance
|
MediaPlayers |
Players()
Get MediaPlayers instance
|
Products |
Products()
Get Products instance
|
Publishers |
Publishers()
Get Publishers instance
|
void |
resetScreenContext()
Reset Screen context to prevent bad link between screen and gesture
|
Screens |
Screens()
Get Screens instance
|
SelfPromotions |
SelfPromotions()
Get SelfPromotions instance
|
void |
setCampaignLastPersistenceEnabled(boolean enabled,
SetConfigCallback setConfigCallback,
boolean... sync)
Enable last persistence campaign
|
void |
setCampaignLifetime(int lifetime,
SetConfigCallback setConfigCallback,
boolean... sync)
Set a new campaign lifetime
|
void |
setConfig(java.util.HashMap<java.lang.String,java.lang.Object> conf,
boolean override,
SetConfigCallback setConfigCallback,
boolean... sync)
Deprecated.
Since 2.3.5, override boolean parameter is useless,
setConfig(HashMap, SetConfigCallback, boolean...) instead. |
void |
setConfig(java.util.HashMap<java.lang.String,java.lang.Object> conf,
SetConfigCallback setConfigCallback,
boolean... sync)
Set a new configuration
|
void |
setConfig(java.lang.String key,
java.lang.Object value,
SetConfigCallback setConfigCallback,
boolean... sync)
Set an only one new key/value pair
|
void |
setCrashDetectionEnabled(boolean enabled,
SetConfigCallback setConfigCallback,
boolean... sync)
Enable crash detection
|
Tracker |
setDefaultListener()
Set a default tracker listener (see createDefaultTrackerListener method)
|
void |
setDomain(java.lang.String domain,
SetConfigCallback setConfigCallback,
boolean... sync)
Set a new domain
|
void |
setHashUserIdEnabled(boolean enabled,
SetConfigCallback setConfigCallback,
boolean... sync)
Enable hash user id (SHA-256 with salt to ensure anonymity)
|
void |
setIdentifierType(Tracker.IdentifierType identifierType,
SetConfigCallback setConfigCallback,
boolean... sync)
Set a new identifier type
|
void |
setIgnoreLimitedAdTrackingEnabled(boolean enabled,
SetConfigCallback setConfigCallback,
boolean... sync)
Enable ignore limited ad tracking
|
Tracker |
setListener(TrackerListener trackerListener)
Set a new listener
|
void |
setLog(java.lang.String log,
SetConfigCallback setConfigCallback,
boolean... sync)
Set a new log
|
void |
setMaxHitSize(int maxHitSize)
Set a new max hit size value
|
void |
setOfflineMode(Tracker.OfflineMode offlineMode,
SetConfigCallback setConfigCallback,
boolean... sync)
Set a new offline mode
|
Tracker |
setParam(java.lang.String key,
boolean value)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
boolean value,
ParamOption options)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
double value)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
double value,
ParamOption options)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
float value)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
float value,
ParamOption options)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
int value)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
int value,
ParamOption options)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
java.util.List value)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
java.util.List value,
ParamOption options)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
java.util.Map value)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
java.util.Map value,
ParamOption options)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
java.lang.Object[] value)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
java.lang.Object[] value,
ParamOption options)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
java.lang.String value)
Add a parameter in the hit querystring
|
Tracker |
setParam(java.lang.String key,
java.lang.String value,
ParamOption options)
Add a parameter in the hit querystring
|
void |
setPersistentIdentifiedVisitorEnabled(boolean enabled,
SetConfigCallback setConfigCallback,
boolean... sync)
Enable persistent identified visitor (identification data available for all sessions)
|
void |
setPixelPath(java.lang.String pixelPath,
SetConfigCallback setConfigCallback,
boolean... sync)
Set new pixel path
|
void |
setPlugins(java.util.List<Tracker.PluginKey> plugins,
SetConfigCallback setConfigCallback,
boolean... sync)
Set new plugins
|
Tracker |
setProp(java.lang.String key,
java.lang.String value,
boolean persistent)
Add a property in the hit querystring
|
Tracker |
setProps(java.util.Map<java.lang.String,java.lang.String> props,
boolean persistent)
Add properties in the hit querystring
|
void |
setSecuredLog(java.lang.String securedLog,
SetConfigCallback setConfigCallback,
boolean... sync)
Set a new secured log
|
void |
setSecureModeEnabled(boolean enabled,
SetConfigCallback setConfigCallback,
boolean... sync)
Deprecated.
Since 2.14.0, secure mode forced
|
void |
setSendHitWhenOptOutEnabled(boolean enabled,
SetConfigCallback setConfigCallback,
boolean... sync)
Enable send hit when opt out
|
void |
setSessionBackgroundDuration(int duration,
SetConfigCallback setConfigCallback,
boolean... sync)
Set a new session background duration
|
void |
setSiteId(int siteId,
SetConfigCallback setConfigCallback,
boolean... sync)
Set a new siteId
|
void |
setUserId(java.lang.String value)
Set a custom user Id
|
void |
setUUIDDuration(int uuidDuration)
Set a new uuid duration
|
void |
setUUIDExpirationMode(Tracker.UUIDExpirationMode uuidExpirationMode)
Set a new uuid expiration mode
|
void |
unsetParam(java.lang.String key)
Remove a parameter from the hit querystring
|
public Tracker()
public Tracker(android.content.Context context)
context
- the current Activity contextpublic Tracker(java.util.HashMap<java.lang.String,java.lang.Object> configuration)
configuration
- map that contains new keys/values see TrackerConfigurationKeyspublic Tracker(android.content.Context context, java.util.HashMap<java.lang.String,java.lang.Object> configuration)
context
- the current Activity contextconfiguration
- map that contains new keys/values see TrackerConfigurationKeyspublic java.util.LinkedHashMap<java.lang.String,BusinessObject> getBusinessObjects()
public Configuration getConfiguration()
public TrackerListener getListener()
public void getUserId(UserIdCallback callback)
callback
- UserIdCallback: Called when user ID is availablepublic java.lang.String getUserIdSync()
public void setUserId(java.lang.String value)
value
- new userId valuepublic Screens Screens()
public Gestures Gestures()
public Events Events()
public ECommerce ECommerce()
public AVInsights AVInsights()
public Offline Offline()
public Context Context()
public NuggAds NuggAds()
public CustomObjects CustomObjects()
public IdentifiedVisitor IdentifiedVisitor()
public Publishers Publishers()
public SelfPromotions SelfPromotions()
public DynamicScreens DynamicScreens()
public Products Products()
public Cart Cart()
public MediaPlayers Players()
@Deprecated public Locations Locations()
@Deprecated public CustomVars CustomVars()
@Deprecated public Aisles Aisles()
public Campaigns Campaigns()
@Deprecated public CustomTreeStructures CustomTreeStructures()
@Deprecated public InternalSearches InternalSearches()
public Orders Orders()
public MvTestings MvTestings()
public void setLog(java.lang.String log, SetConfigCallback setConfigCallback, boolean... sync)
log
- ATInternet subdomain valuesetConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setSecuredLog(java.lang.String securedLog, SetConfigCallback setConfigCallback, boolean... sync)
securedLog
- ATInternet secured subdomain valuesetConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setDomain(java.lang.String domain, SetConfigCallback setConfigCallback, boolean... sync)
domain
- ATInternet collect domain valuesetConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setSiteId(int siteId, SetConfigCallback setConfigCallback, boolean... sync)
siteId
- ATInternet site identifiersetConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setOfflineMode(Tracker.OfflineMode offlineMode, SetConfigCallback setConfigCallback, boolean... sync)
offlineMode
- /setConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)@Deprecated public void setSecureModeEnabled(boolean enabled, SetConfigCallback setConfigCallback, boolean... sync)
enabled
- /setConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setIdentifierType(Tracker.IdentifierType identifierType, SetConfigCallback setConfigCallback, boolean... sync)
identifierType
- /setConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setIgnoreLimitedAdTrackingEnabled(boolean enabled, SetConfigCallback setConfigCallback, boolean... sync)
enabled
- /setConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setSendHitWhenOptOutEnabled(boolean enabled, SetConfigCallback setConfigCallback, boolean... sync)
enabled
- /setConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setHashUserIdEnabled(boolean enabled, SetConfigCallback setConfigCallback, boolean... sync)
enabled
- /setConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setPlugins(java.util.List<Tracker.PluginKey> plugins, SetConfigCallback setConfigCallback, boolean... sync)
plugins
- /setConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setPixelPath(java.lang.String pixelPath, SetConfigCallback setConfigCallback, boolean... sync)
pixelPath
- request path to get pixelsetConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setPersistentIdentifiedVisitorEnabled(boolean enabled, SetConfigCallback setConfigCallback, boolean... sync)
enabled
- /setConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setCrashDetectionEnabled(boolean enabled, SetConfigCallback setConfigCallback, boolean... sync)
enabled
- /setConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setCampaignLastPersistenceEnabled(boolean enabled, SetConfigCallback setConfigCallback, boolean... sync)
enabled
- store last or first campaignsetConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setCampaignLifetime(int lifetime, SetConfigCallback setConfigCallback, boolean... sync)
lifetime
- campaign lifetimesetConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setSessionBackgroundDuration(int duration, SetConfigCallback setConfigCallback, boolean... sync)
duration
- duration between two application openings after which a new session is startedsetConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setMaxHitSize(int maxHitSize)
maxHitSize
- intpublic void setUUIDDuration(int uuidDuration)
uuidDuration
- intpublic void setUUIDExpirationMode(Tracker.UUIDExpirationMode uuidExpirationMode)
uuidExpirationMode
- UUIDExpirationModepublic TrackerListener createDefaultTrackerListener()
@Deprecated public void setConfig(java.util.HashMap<java.lang.String,java.lang.Object> conf, boolean override, SetConfigCallback setConfigCallback, boolean... sync)
setConfig(HashMap, SetConfigCallback, boolean...)
instead.conf
- map that contains new keys/valuesoverride
- if true, old config fully cleared AND all default keys MUST be setsetConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setConfig(java.util.HashMap<java.lang.String,java.lang.Object> conf, SetConfigCallback setConfigCallback, boolean... sync)
conf
- map that contains new keys/valuessetConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public void setConfig(java.lang.String key, java.lang.Object value, SetConfigCallback setConfigCallback, boolean... sync)
key
- /value
- /setConfigCallback
- Callback called when the operation has been donesync
- (optional) perform the operation synchronously (default: false)public Tracker setListener(TrackerListener trackerListener)
trackerListener
- /public Tracker setDefaultListener()
@Deprecated public static void optOut(boolean enabled)
enabled
- /@Deprecated public static boolean optOutEnabled()
@Deprecated public static void doNotTrack(boolean enabled)
optOut(boolean)
insteadenabled
- /@Deprecated public static boolean doNotTrackEnabled()
optOutEnabled()
insteadpublic Tracker setParam(java.lang.String key, int value)
key
- parameter keyvalue
- integer valuepublic Tracker setParam(java.lang.String key, int value, ParamOption options)
key
- parameter keyvalue
- integer valueoptions
- parameter optionspublic Tracker setParam(java.lang.String key, float value)
key
- parameter keyvalue
- float valuepublic Tracker setParam(java.lang.String key, float value, ParamOption options)
key
- parameter keyvalue
- float valueoptions
- parameter optionspublic Tracker setParam(java.lang.String key, double value)
key
- parameter keyvalue
- double valuepublic Tracker setParam(java.lang.String key, double value, ParamOption options)
key
- parameter keyvalue
- double valueoptions
- parameter optionspublic Tracker setParam(java.lang.String key, boolean value)
key
- parameter keyvalue
- boolean valuepublic Tracker setParam(java.lang.String key, boolean value, ParamOption options)
key
- parameter keyvalue
- boolean valueoptions
- parameter optionspublic Tracker setParam(java.lang.String key, java.lang.String value)
key
- parameter keyvalue
- string valuepublic Tracker setProp(java.lang.String key, java.lang.String value, boolean persistent)
key
- property keyvalue
- string valuepersistent
- boolean optionpublic Tracker setProps(java.util.Map<java.lang.String,java.lang.String> props, boolean persistent)
props
- props mappublic Param getProp(java.lang.String key)
key
- property keypublic java.util.List<Param> getProps()
public void delProp(java.lang.String key)
key
- property keypublic void delProps()
public Tracker setParam(java.lang.String key, java.lang.String value, ParamOption options)
key
- parameter keyvalue
- string valueoptions
- parameter optionspublic Tracker setParam(java.lang.String key, java.util.List value)
key
- parameter keyvalue
- list valuepublic Tracker setParam(java.lang.String key, java.util.List value, ParamOption options)
key
- parameter keyvalue
- list valueoptions
- parameter optionspublic Tracker setParam(java.lang.String key, java.lang.Object[] value)
key
- parameter keyvalue
- object array valuepublic Tracker setParam(java.lang.String key, java.lang.Object[] value, ParamOption options)
key
- parameter keyvalue
- object array valueoptions
- parameter optionspublic Tracker setParam(java.lang.String key, java.util.Map value)
key
- parameter keyvalue
- map valuepublic Tracker setParam(java.lang.String key, java.util.Map value, ParamOption options)
key
- parameter keyvalue
- map valueoptions
- parameter optionspublic void unsetParam(java.lang.String key)
key
- parameter key to removepublic void resetScreenContext()
public void dispatch()
public java.util.Map<java.lang.String,java.lang.Object> getLifecycleMetrics()
public java.util.Map<java.lang.String,java.lang.String> getCrashInformation()
public java.lang.String getSdkVersion()