It is possible to change the global configuration. Otherwise, the default configuration is used.

Configuration Options

We highly recommend to enable batch support and use the client timestamp in your account for page duration calculation to increase data quality. Please contact your account manager to enable client timestamp support in your account.

class WebtrekkConfiguration private constructor(
    override val trackIds: List<String>,
    override val trackDomain: String,
    override val logLevel: Logger.Level,
    override val requestsInterval: Long,
    override val autoTracking: Boolean,
    override val fragmentsAutoTracking: Boolean,
    override val workManagerConstraints: Constraints,
    override val okHttpClient: OkHttpClient,
    override val requestPerBatch: Int,
    override val batchSupport: Boolean,
    override val activityAutoTracking: Boolean
	override val exceptionLogLevel: ExceptionType,
    override val shouldMigrate: Boolean,
    override val versionInEachRequest: Boolean,
    override val everId: String?
trackIdsMandatory. The track id is used to generate the correct request URL.blank
trackDomainMandatory. The track domain is used to generate the correct request URLblank

Optional. Used to log data generated by the SDK for debugging purposes. We do not recommend to enable it in production. Possible values are:

NONE = Logging is disabled.

BASIC = Logging is enabled.


Optional. This parameter defines the periodic time for sending the cached tracking data to the Mapp server. This is set to 15 min by default. If you want a different transmission interval, you can overwrite the default setting here. If you would like to initiate a request, you can also use sendRequestsNowAndClean


Optional. When enabled, the class name of the activity and any fragment included are used to generate the page name of the screen. It is possible to disable autotracking for fragments or activities individually or keep autotracking on for both. We recommend to disable autotracking in production.

fragmentsAutoTrackingOptional. When autotracking is enabled, it is possible to disable automatic page name declaration for fragments only.Enabled
workManagerConstraintsOptional. You can set WorkManager parameters according to your needs, see WorkManager.-
okHttpClientOptional. You can adjust the okHttpClient used in the SDK, to setup certificates pinning, interceptors, etc., see OkHttpClient Builder.-
requestPerBatchOptional. When batch support is enabled, you can adjust the number of requests per batch. The maximum number of requests per batch allowed is 10000.5000
BatchSupportOptional. When batch support is enabled, the requests are sent to the server in batches instead of individually. It is recommended to enable batch support, see Batch Support.Disabled
ActivityAutoTrackingOptional. When autotracking is enabled, it is possible to disable automatic page name declaration for activities only.Enabled
exceptionLogLevelOptional. Supports various types of Crash Tracking analyses.NONE
shouldMigrateOptional. Enable if you want to migrate from SDK version 4 to SDK version 5 without losing customer everID data. (Available from version 5.0.3 onwards)Disabled
versionInEachRequestOptional. Enable if you like to send the version in each request instead of once per session.Disabled
everIdOptional. Use if you want to set your own everID instead of having one created by the SDK.Disabled


logLevel(logLevel: Logger.level)Overrides the default logLevel.

requestInterval(timeUnit: TimeUnit = TimeUnit.MINUTES, interval: Long)

Overrides the default requestInterval.

Please note that the minimum time interval is 15 minutes. You can, therefore, only set a time interval of 15 minutes or more.


Disables autotracking. Read also the chapter Automatic Tracking.

true = Auto tracking is disabled.

disableActivityAutotracking(Boolean)Disables autotracking of activities only (not needed when autotracking is already disabled). Read also the chapter Automatic Tracking.
setBatchSupport(batchEnable: Boolean,requestsInBatch: Int = DefaultConfiguration.REQUEST_PER_BATCH)Configures batch support. Sets batch support to "true" and gives the option to configure the amount of requests per batch. Leaves default amount of requests per batch if nothing is specified.
disableFragmentsAutoTracking(Boolean)Disables autotracking of fragments only (not needed when autotracking is already disabled). Read also the chapter Automatic Tracking.

workManagerConstraints(constraints: Constraints)

Specifies workManager constraints. See WorkManager for further information.

okHttpClient(okHttpClient: OkHttpClient)

Used to adjust the okHttpClient. See OkHttpClient Builder for further information
enableCrashTracking(exceptionLogLevel: ExceptionType)Overrides the default exception type.
enableMigration()Keeps customer everID data when migrating from SDK version 4 to SDK version 5.


Sends the default app version parameter in every request. If disabled, it is only sent if the SDK starts a new session, which might lead to inconsistencies in your analyses.
setEverId()This function can be used to set the Everid via configuration, instead of using the one generated during initialization. If you use the function but leave the String empty, the SDK will generate one as usual.
Webtrekk.reset(context,config)Allows you to restart and reset the SDK while it is active.


class SampleApplication : Application() {
     override fun onCreate() {
         super .onCreate()
         val webtrekkConfigurations =
             WebtrekkConfiguration.Builder(listOf( "track Id" ), "track domain" )
                 .requestsInterval(TimeUnit.MINUTES, 15 )
                 .setBatchSupport( true , 10000 )
         Webtrekk.getInstance().init( this , webtrekkConfigurations)

public class SampleApplication extends Application {
     public void onCreate() {
     super .onCreate();
     List<String> trackIds = new ArrayList<>();
     trackIds.add( "track id" );
     WebtrekkConfiguration webtrekkConfiguration = new WebtrekkConfiguration.Builder(trackIds, "track domain" )
         .setRequestsInterval(TimeUnit.MINUTES, 15 )
         .setBatchSupport( true , 10000 )
     Webtrekk.getInstance().init( this , webtrekkConfiguration);