Integration

Maven

<dependency>
	<groupId>com.mapp.intelligence.tracking</groupId>
	<artifactId>tracking</artifactId>
	<version>0.1.5</version>
</dependency>
XML

Gradle

compile group: 'com.mapp.intelligence.tracking', name: 'tracking', version: '0.1.5'
BASH

Configuration

MappIntelligenceConfig mappIntelligenceConfig = new MappIntelligenceConfig()
	.setTrackId("111111111111111")
	.setTrackDomain("analytics01.wt-eu02.net")
	.setDomain(new ArrayList<String>())
	.addDomain("")
	.setUseParamsForDefaultPageName(new ArrayList<String>())
	.addUseParamsForDefaultPageName("")

	.setContainsInclude(new ArrayList<String>())
	.addContainsInclude("")
	.setContainsExclude(new ArrayList<String>())
	.addContainsExclude("")
	.setMatchesInclude(new ArrayList<String>())
	.addMatchesInclude("")
	.setMatchesExclude(new ArrayList<String>())
	.addMatchesExclude("")

	.setLogger(null)
	.setLogLevel(MappIntelligenceLogLevel.ERROR)
	.setDeactivate(false)

	.setConsumerType("")
	.setConsumer(null)
	.filePath("/tmp/")
	.filePrefix("MappIntelligenceRequests")
	.setMaxAttempt(1)
	.setAttemptTimeout(100)
	.setConnectionTimeout(30 * 1000)
	.setReadTimeout(5 * 1000)
	.setMaxBatchSize(50)
	.setMaxQueueSize(1000)
	.setMaxFileLines(10000)
    .setMaxFileDuration(30 * 60 * 1000)
    .setMaxFileSize(24 * 1024 * 1024)
	.setForceSSL(true)

	.setUserAgent("")
	.setClientHintUserAgent("")
	.setClientHintUserAgentFullVersionList("")
	.setClientHintUserAgentMobile("")
	.setClientHintUserAgentModel("")
	.setClientHintUserAgentPlatform("")
	.setClientHintUserAgentPlatformVersion("")
	.setRemoteAddress("")
	.setReferrerURL("")
	.setRequestURL("")
	.setCookie(new HashMap<String, String>())
	.addCookie("", "");
JAVA
MethodsTypeNotesDefaultMandatory
setTrackIdStringEnter your Mapp Intelligence track ID provided by Mapp.emptyyes
setTrackDomainStringEnter your Mapp Intelligence tracking URL.emptyyes
setDomainList<String>Specify the domains you do not want to identify as an external referrer (e.g. your subdomains).

empty

no
addDomainStringSpecify the domain you do not want to identify as an external referrer (e.g. your subdomains).emptyno
setUseParamsForDefaultPageNameList<String>Includes specific URL parameter(s) in the default page name.emptyno
addUseParamsForDefaultPageNameStringIncludes specific URL parameter in the default page name.emptyno
setContainsIncludeList<String>Specify the strings that must be contained in the request URL to measure the request.emptyno
addContainsIncludeStringSpecify the string that must be contained in the request URL to measure the request.emptyno
setContainsExcludeList<String>Specify the strings that must be contained in the request URL to not measure the request.emptyno
addContainsExcludeStringSpecify the string that must be contained in the request URL to not measure the request.emptyno
setMatchesIncludeList<String>Specify the regular expressions that must be match the request URL to measure the request.emptyno
addMatchesIncludeStringSpecify the regular expression that must be match the request URL to measure the request.emptyno
setMatchesExcludeList<String>Specify the regular expressions that must be match the request URL to not measure the request.emptyno
addMatchesExcludeStringSpecify the regular expression that must be match the request URL to not measure the request.emptyno
setLoggerMappIntelligenceLoggerActivates the debug mode. The debug mode sends messages your own LoggerClass (see MappIntelligenceLogger).nullno
setLogLevelString

Specify the debug log level:

  • NONE: no logs
  • FATAL: fatal errors
  • ERROR: errors leading to data loss or break code
  • WARN: errors that can affect data quality
  • INFO:  general info on configuration and send status
  • DEBUG: general info on request sendout and queue status
ERRORno
setDeactivateBooleanDeactivate the tracking functionality.falseno
setConsumerTypeStringSpecify the consumer to use for data transfer to Intelligence (HTTP_CLIENT, FILE or CUSTOM).HTTP_CLIENTno
setConsumerMappIntelligenceConsumerSpecify the custom consumer to use for data transfer to Intelligence (see MappIntelligenceConsumer).null
setFilePathStringEnter the path to your request logging file. This is only relevant when using file consumer.System.getProperty("java.io.tmpdir") + "/"no
setFilePrefixStringEnter the prefix from your request logging files. This is only relevant when using file consumer.MappIntelligenceRequestsno
setMaxAttemptIntegerSpecify the number of resend attempts. After the maxAttempts have been reached, the requests will be deleted even if the sending failed.1no
setAttemptTimeoutIntegerSpecify the interval of request resend in milliseconds.100no
setConnectionTimeoutIntegerSpecify the number for connection timeout in milliseconds.30 * 1000no
setReadTimeoutIntegerSpecify the number for read timeout in milliseconds.5 * 1000no
setMaxBatchSizeIntegerSpecify the maximum request number per batch.50no
setMaxQueueSizeIntegerSpecify the maximum number of requests saved in the queue.1000no
setMaxFileLinesIntegerThe maximum number of maximal lines per file.10 * 1000no
setMaxFileDurationIntegerThe maximum number of maximal file duration.30 * 60 * 1000no
setMaxFileSizeIntegerThe maximum number of maximal file size.24 * 1024 * 1024no
setForceSSLBooleanSends every request via SSL.trueno
setUserAgentStringEnter the origin client HTTP user agent string.emptyno
setClientHintUserAgentStringEnter the origin Client Hint header for "sec-ch-ua" (see How can I make my website ready for Google Chrome's Client Hints? and Information on Google Chrome User-Agent Client Hints for more details).emptyno
setClientHintUserAgentFullVersionListStringEnter the origin Client Hint header for "sec-ch-ua-full-version-list" (see How can I make my website ready for Google Chrome's Client Hints? and Information on Google Chrome User-Agent Client Hints for more details).emptyno
setClientHintUserAgentMobileStringEnter the origin Client Hint header for "sec-ch-ua-mobile" (see How can I make my website ready for Google Chrome's Client Hints? and Information on Google Chrome User-Agent Client Hints for more details).emptyno
setClientHintUserAgentModelStringEnter the origin Client Hint header for "sec-ch-ua-model" (see How can I make my website ready for Google Chrome's Client Hints? and Information on Google Chrome User-Agent Client Hints for more details).emptyno
setClientHintUserAgentPlatformStringEnter the origin Client Hint header for "sec-ch-ua-platform" (see How can I make my website ready for Google Chrome's Client Hints? and Information on Google Chrome User-Agent Client Hints for more details).emptyno
setClientHintUserAgentPlatformVersionStringEnter the origin Client Hint header for "sec-ch-ua-platform-version" (see How can I make my website ready for Google Chrome's Client Hints? and Information on Google Chrome User-Agent Client Hints for more details).emptyno
setRemoteAddressStringEnter the origin client Remote address (ip).emptyno
setReferrerURLStringEnter the origin client HTTP referrer URL.emptyno
setRequestURLStringEnter the origin client HTTP request URL.emptyno
setCookieMap<String, String>Enter a map of all origin client cookies.emptyno
addCookieStringEnter a origin client cookie (key, value).emptyno















MappIntelligenceConfig mappIntelligenceConfig = new MappIntelligenceConfig(
	"path/to/your/properties/file/config.properties"
);
JAVA
# [tracking]
tracking.trackId=111111111111111
tracking.trackDomain=analytics01.wt-eu02.net
tracking.deactivate=false
tracking.domain=
tracking.logLevel=DEBUG
tracking.useParamsForDefaultPageName=
tracking.containsInclude=foo;bar
tracking.containsExclude=test
tracking.matchesInclude=.*foo.*;.*bar.*
tracking.matchesExclude=.*test.*

# [consumer]
consumer.consumerType=FILE
consumer.filePath=
consumer.filePrefix=
consumer.maxAttempt=1
consumer.attemptTimeout=100
consumer.maxBatchSize=50
consumer.maxQueueSize=1000
consumer.maxFileLines=10000
consumer.maxFileDuration=1800000
consumer.maxFileSize=25165824
consumer.forceSSL=true
TEXT
MappIntelligenceConfig mappIntelligenceConfig = new MappIntelligenceConfig(
	"path/to/your/xml/file/config.xml"
);
JAVA
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
    <!-- [tracking] -->
    <entry key="tracking.trackId">111111111111111</entry>
    <entry key="tracking.trackDomain">analytics01.wt-eu02.net</entry>
    <entry key="tracking.deactivate">false</entry>
    <entry key="tracking.domain" />
    <entry key="tracking.logLevel">DEBUG</entry>
    <entry key="tracking.useParamsForDefaultPageName" />
    <entry key="tracking.containsInclude">foo;bar</entry>
    <entry key="tracking.containsExclude">test</entry>
    <entry key="tracking.matchesInclude">*foo.*;.*bar.*</entry>
    <entry key="tracking.matchesExclude">.*test.*</entry>

    <!-- [consumer] -->
    <entry key="consumer.consumerType">FILE</entry>
    <entry key="consumer.filePath" />
    <entry key="consumer.filePrefix" />
    <entry key="consumer.maxAttempt">1</entry>
    <entry key="consumer.attemptTimeout">100</entry>
    <entry key="consumer.maxBatchSize">50</entry>
    <entry key="consumer.maxQueueSize">1000</entry>
	<entry key="consumer.maxFileLines">10000</entry>
    <entry key="consumer.maxFileDuration">1800000</entry>
    <entry key="consumer.maxFileSize">25165824</entry>
    <entry key="consumer.forceSSL">true</entry>
</properties>
XML