Integration

Download

https://github.com/mapp-digital/Mapp-Intelligence-Java-Tracking/releases
BASH

Maven

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

Gradle

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

Configuration

MappIntelligenceConfig mappIntelligenceConfig = new MappIntelligenceConfig()
	.setTrackId("111111111111111")
	.setTrackDomain("analytics01.wt-eu02.net")
	.setDomain(new ArrayList<String>())
	.addDomain("")
	.setUseParamsForDefaultPageName(new ArrayList<String>())
	.addUseParamsForDefaultPageName("")
	
	.setLogger(null)
	.setDeactivate(false)
	
	.setConsumerType("")
	.setConsumer(null)
	.filePath("/tmp/")
	.filePrefix("MappIntelligenceRequests")
	.setMaxAttempt(1)
	.setAttemptTimeout(100)
	.setMaxBatchSize(50)
	.setMaxQueueSize(1000)
	.setMaxFileLines(10000)
    .setMaxFileDuration(30 * 60 * 1000)
    .setMaxFileSize(24 * 1024 * 1024)
	.setForceSSL(true)
	
	.setUserAgent("")
	.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
setLoggerMappIntelligenceLoggerActivates the debug mode. The debug mode sends messages your own LoggerClass (see MappIntelligenceLogger).nullno
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
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
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.useParamsForDefaultPageName=

# [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.useParamsForDefaultPageName" />

    <!-- [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