public class TrackerConfiguration extends Object implements com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterface, Configuration
| Modifier and Type | Field and Description |
|---|---|
String |
appId |
boolean |
applicationContext |
boolean |
base64encoding |
boolean |
deepLinkContext |
DevicePlatform |
devicePlatform |
boolean |
diagnosticAutotracking |
boolean |
exceptionAutotracking |
boolean |
geoLocationContext |
boolean |
installAutotracking |
boolean |
lifecycleAutotracking |
LoggerDelegate |
loggerDelegate |
LogLevel |
logLevel |
boolean |
platformContext |
boolean |
screenContext |
boolean |
screenViewAutotracking |
boolean |
sessionContext |
static String |
TAG |
String |
trackerVersionSuffix |
| Constructor and Description |
|---|
TrackerConfiguration(String appId)
It sets a default TrackerConfiguration.
|
TrackerConfiguration(String appId,
JSONObject jsonObject) |
| Modifier and Type | Method and Description |
|---|---|
TrackerConfiguration |
appId(String appId)
Identifer of the app.
|
TrackerConfiguration |
applicationContext(boolean applicationContext)
Whether application context is sent with all the tracked events.
|
TrackerConfiguration |
base64encoding(boolean base64encoding)
It indicates whether the JSON data in the payload should be base64 encoded.
|
Configuration |
copy() |
TrackerConfiguration |
deepLinkContext(boolean deepLinkContext)
Whether deepLink context is sent with all the ScreenView events.
|
TrackerConfiguration |
devicePlatform(DevicePlatform devicePlatform)
It sets the device platform the tracker is running on.
|
TrackerConfiguration |
diagnosticAutotracking(boolean diagnosticAutotracking)
Whether enable diagnostic reporting.
|
TrackerConfiguration |
exceptionAutotracking(boolean exceptionAutotracking)
Whether enable crash reporting.
|
TrackerConfiguration |
geoLocationContext(boolean geoLocationContext)
Whether geo-location context is sent with all the tracked events.
|
String |
getAppId() |
DevicePlatform |
getDevicePlatform() |
LoggerDelegate |
getLoggerDelegate() |
LogLevel |
getLogLevel() |
String |
getTrackerVersionSuffix() |
TrackerConfiguration |
installAutotracking(boolean installAutotracking)
Whether enable automatic tracking of install event.
|
boolean |
isApplicationContext() |
boolean |
isBase64encoding() |
boolean |
isDeepLinkContext() |
boolean |
isDiagnosticAutotracking() |
boolean |
isExceptionAutotracking() |
boolean |
isGeoLocationContext() |
boolean |
isInstallAutotracking() |
boolean |
isLifecycleAutotracking() |
boolean |
isPlatformContext() |
boolean |
isScreenContext() |
boolean |
isScreenViewAutotracking() |
boolean |
isSessionContext() |
TrackerConfiguration |
lifecycleAutotracking(boolean lifecycleAutotracking)
Whether enable automatic tracking of background and foreground transitions.
|
TrackerConfiguration |
loggerDelegate(LoggerDelegate loggerDelegate)
It sets the logger delegate that receive logs from the tracker.
|
TrackerConfiguration |
logLevel(LogLevel logLevel)
It sets the log level of tracker logs.
|
TrackerConfiguration |
platformContext(boolean platformContext)
Whether mobile/platform context is sent with all the tracked events.
|
TrackerConfiguration |
screenContext(boolean screenContext)
Whether screen context is sent with all the tracked events.
|
TrackerConfiguration |
screenViewAutotracking(boolean screenViewAutotracking)
Whether enable automatic tracking of ScreenView events.
|
TrackerConfiguration |
sessionContext(boolean sessionContext)
Whether session context is sent with all the tracked events.
|
void |
setAppId(String appId) |
void |
setApplicationContext(boolean applicationContext) |
void |
setBase64encoding(boolean base64encoding) |
void |
setDeepLinkContext(boolean deepLinkContext) |
void |
setDevicePlatform(DevicePlatform devicePlatform) |
void |
setDiagnosticAutotracking(boolean diagnosticAutotracking) |
void |
setExceptionAutotracking(boolean exceptionAutotracking) |
void |
setGeoLocationContext(boolean geoLocationContext) |
void |
setInstallAutotracking(boolean installAutotracking) |
void |
setLifecycleAutotracking(boolean lifecycleAutotracking) |
void |
setLoggerDelegate(LoggerDelegate loggerDelegate) |
void |
setLogLevel(LogLevel logLevel) |
void |
setPlatformContext(boolean platformContext) |
void |
setScreenContext(boolean screenContext) |
void |
setScreenViewAutotracking(boolean screenViewAutotracking) |
void |
setSessionContext(boolean sessionContext) |
void |
setTrackerVersionSuffix(String trackerVersionSuffix) |
TrackerConfiguration |
trackerVersionSuffix(String trackerVersionSuffix)
Decorate the v_tracker field in the tracker protocol.
|
public static final String TAG
@NonNull public String appId
appId(String)@NonNull public DevicePlatform devicePlatform
devicePlatform(DevicePlatform)public boolean base64encoding
base64encoding(boolean)@NonNull public LogLevel logLevel
logLevel(LogLevel)@Nullable public LoggerDelegate loggerDelegate
loggerDelegate(LoggerDelegate)public boolean applicationContext
applicationContext(boolean)public boolean platformContext
platformContext(boolean)public boolean geoLocationContext
geoLocationContext(boolean)public boolean sessionContext
sessionContext(boolean)public boolean deepLinkContext
deepLinkContext(boolean)public boolean screenContext
screenContext(boolean)public boolean screenViewAutotracking
screenViewAutotracking(boolean)public boolean lifecycleAutotracking
lifecycleAutotracking(boolean)public boolean installAutotracking
installAutotracking(boolean)public boolean exceptionAutotracking
exceptionAutotracking(boolean)public boolean diagnosticAutotracking
diagnosticAutotracking(boolean)@Nullable public String trackerVersionSuffix
trackerVersionSuffix(String)public TrackerConfiguration(@NonNull
String appId)
appId - Identifier of the app.public TrackerConfiguration(@NonNull
String appId,
@NonNull
JSONObject jsonObject)
@NonNull public String getAppId()
getAppId in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setAppId(@NonNull
String appId)
setAppId in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterface@NonNull public DevicePlatform getDevicePlatform()
getDevicePlatform in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setDevicePlatform(@NonNull
DevicePlatform devicePlatform)
setDevicePlatform in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic boolean isBase64encoding()
isBase64encoding in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setBase64encoding(boolean base64encoding)
setBase64encoding in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterface@NonNull public LogLevel getLogLevel()
getLogLevel in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setLogLevel(@NonNull
LogLevel logLevel)
setLogLevel in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterface@Nullable public LoggerDelegate getLoggerDelegate()
getLoggerDelegate in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setLoggerDelegate(@Nullable
LoggerDelegate loggerDelegate)
setLoggerDelegate in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic boolean isApplicationContext()
isApplicationContext in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setApplicationContext(boolean applicationContext)
setApplicationContext in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic boolean isPlatformContext()
isPlatformContext in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setPlatformContext(boolean platformContext)
setPlatformContext in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic boolean isGeoLocationContext()
isGeoLocationContext in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setGeoLocationContext(boolean geoLocationContext)
setGeoLocationContext in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic boolean isSessionContext()
isSessionContext in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setSessionContext(boolean sessionContext)
setSessionContext in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic boolean isDeepLinkContext()
isDeepLinkContext in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setDeepLinkContext(boolean deepLinkContext)
setDeepLinkContext in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic boolean isScreenContext()
isScreenContext in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setScreenContext(boolean screenContext)
setScreenContext in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic boolean isScreenViewAutotracking()
isScreenViewAutotracking in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setScreenViewAutotracking(boolean screenViewAutotracking)
setScreenViewAutotracking in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic boolean isLifecycleAutotracking()
isLifecycleAutotracking in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setLifecycleAutotracking(boolean lifecycleAutotracking)
setLifecycleAutotracking in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic boolean isInstallAutotracking()
isInstallAutotracking in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setInstallAutotracking(boolean installAutotracking)
setInstallAutotracking in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic boolean isExceptionAutotracking()
isExceptionAutotracking in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setExceptionAutotracking(boolean exceptionAutotracking)
setExceptionAutotracking in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic boolean isDiagnosticAutotracking()
isDiagnosticAutotracking in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setDiagnosticAutotracking(boolean diagnosticAutotracking)
setDiagnosticAutotracking in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterface@Nullable public String getTrackerVersionSuffix()
getTrackerVersionSuffix in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterfacepublic void setTrackerVersionSuffix(@Nullable
String trackerVersionSuffix)
setTrackerVersionSuffix in interface com.snowplowanalytics.snowplow.internal.tracker.TrackerConfigurationInterface@NonNull public TrackerConfiguration appId(@NonNull String appId)
@NonNull public TrackerConfiguration devicePlatform(@NonNull DevicePlatform devicePlatform)
@NonNull public TrackerConfiguration base64encoding(boolean base64encoding)
@NonNull public TrackerConfiguration logLevel(@NonNull LogLevel logLevel)
@NonNull public TrackerConfiguration loggerDelegate(@Nullable LoggerDelegate loggerDelegate)
@NonNull public TrackerConfiguration applicationContext(boolean applicationContext)
@NonNull public TrackerConfiguration platformContext(boolean platformContext)
@NonNull public TrackerConfiguration geoLocationContext(boolean geoLocationContext)
@NonNull public TrackerConfiguration sessionContext(boolean sessionContext)
@NonNull public TrackerConfiguration deepLinkContext(boolean deepLinkContext)
@NonNull public TrackerConfiguration screenContext(boolean screenContext)
@NonNull public TrackerConfiguration screenViewAutotracking(boolean screenViewAutotracking)
@NonNull public TrackerConfiguration lifecycleAutotracking(boolean lifecycleAutotracking)
@NonNull public TrackerConfiguration installAutotracking(boolean installAutotracking)
@NonNull public TrackerConfiguration exceptionAutotracking(boolean exceptionAutotracking)
@NonNull public TrackerConfiguration diagnosticAutotracking(boolean diagnosticAutotracking)
@NonNull public TrackerConfiguration trackerVersionSuffix(@Nullable String trackerVersionSuffix)
@NonNull public Configuration copy()
copy in interface Configuration