- 4 Minutes to read
- Print
- DarkLight
Integration and Configuration
- 4 Minutes to read
- Print
- DarkLight
Integration
Maven
<dependency>
<groupId>com.mapp.intelligence.tracking</groupId>
<artifactId>tracking</artifactId>
<version>0.1.5</version>
</dependency>
Gradle
compile group: 'com.mapp.intelligence.tracking', name: 'tracking', version: '0.1.5'
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("", "");
Methods | Type | Notes | Default | Mandatory |
---|---|---|---|---|
setTrackId | String | Enter your Mapp Intelligence track ID provided by Mapp. | empty | yes |
setTrackDomain | String | Enter your Mapp Intelligence tracking URL. | empty | yes |
setDomain | List<String> | Specify the domains you do not want to identify as an external referrer (e.g. your subdomains). | empty | no |
addDomain | String | Specify the domain you do not want to identify as an external referrer (e.g. your subdomains). | empty | no |
setUseParamsForDefaultPageName | List<String> | Includes specific URL parameter(s) in the default page name. | empty | no |
addUseParamsForDefaultPageName | String | Includes specific URL parameter in the default page name. | empty | no |
setContainsInclude | List<String> | Specify the strings that must be contained in the request URL to measure the request. | empty | no |
addContainsInclude | String | Specify the string that must be contained in the request URL to measure the request. | empty | no |
setContainsExclude | List<String> | Specify the strings that must be contained in the request URL to not measure the request. | empty | no |
addContainsExclude | String | Specify the string that must be contained in the request URL to not measure the request. | empty | no |
setMatchesInclude | List<String> | Specify the regular expressions that must be match the request URL to measure the request. | empty | no |
addMatchesInclude | String | Specify the regular expression that must be match the request URL to measure the request. | empty | no |
setMatchesExclude | List<String> | Specify the regular expressions that must be match the request URL to not measure the request. | empty | no |
addMatchesExclude | String | Specify the regular expression that must be match the request URL to not measure the request. | empty | no |
setLogger | MappIntelligenceLogger | Activates the debug mode. The debug mode sends messages your own LoggerClass (see MappIntelligenceLogger). | null | no |
setLogLevel | String | Specify the debug log level:
| ERROR | no |
setDeactivate | Boolean | Deactivate the tracking functionality. | false | no |
setConsumerType | String | Specify the consumer to use for data transfer to Intelligence ( HTTP_CLIENT, FILE or CUSTOM). | HTTP_CLIENT | no |
setConsumer | MappIntelligenceConsumer | Specify the custom consumer to use for data transfer to Intelligence (see MappIntelligenceConsumer). | null | |
setFilePath | String | Enter the path to your request logging file. This is only relevant when using file consumer. | System.getProperty("java.io.tmpdir") + "/" | no |
setFilePrefix | String | Enter the prefix from your request logging files. This is only relevant when using file consumer. | MappIntelligenceRequests | no |
setMaxAttempt | Integer | Specify the number of resend attempts. After the maxAttempts have been reached, the requests will be deleted even if the sending failed. |
| no |
setAttemptTimeout | Integer | Specify the interval of request resend in milliseconds. | 100 | no |
setConnectionTimeout | Integer | Specify the number for connection timeout in milliseconds. | 30 * 1000 | no |
setReadTimeout | Integer | Specify the number for read timeout in milliseconds. | 5 * 1000 | no |
setMaxBatchSize | Integer | Specify the maximum request number per batch. | 50 | no |
setMaxQueueSize | Integer | Specify the maximum number of requests saved in the queue. | 1000 | no |
setMaxFileLines | Integer | The maximum number of maximal lines per file. | 10 * 1000 | no |
setMaxFileDuration | Integer | The maximum number of maximal file duration. | 30 * 60 * 1000 | no |
setMaxFileSize | Integer | The maximum number of maximal file size. | 24 * 1024 * 1024 | no |
setForceSSL | Boolean | Sends every request via SSL. | true | no |
setUserAgent | String | Enter the origin client HTTP user agent string. | empty | no |
setClientHintUserAgent | String | Enter 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). | empty | no |
setClientHintUserAgentFullVersionList | String | Enter 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). | empty | no |
setClientHintUserAgentMobile | String | Enter 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). | empty | no |
setClientHintUserAgentModel | String | Enter 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). | empty | no |
setClientHintUserAgentPlatform | String | Enter 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). | empty | no |
setClientHintUserAgentPlatformVersion | String | Enter 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). | empty | no |
setRemoteAddress | String | Enter the origin client Remote address (ip). | empty | no |
setReferrerURL | String | Enter the origin client HTTP referrer URL. | empty | no |
setRequestURL | String | Enter the origin client HTTP request URL. | empty | no |
setCookie | Map<String, String> | Enter a map of all origin client cookies. | empty | no |
addCookie | String | Enter a origin client cookie (key, value). | empty | no |
MappIntelligenceConfig mappIntelligenceConfig = new MappIntelligenceConfig(
"path/to/your/properties/file/config.properties"
);
# [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
MappIntelligenceConfig mappIntelligenceConfig = new MappIntelligenceConfig(
"path/to/your/xml/file/config.xml"
);
<?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>