Integration

Download

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

NPM

npm i @mapp-intelligence/node
BASH

Configuration

const mappIntelligenceConfig = new MappIntelligenceConfig()
	.setTrackId("111111111111111")
	.setTrackDomain("analytics01.wt-eu02.net")
	.setDomain([])
	.addDomain("")
	.setUseParamsForDefaultPageName([])
	.addUseParamsForDefaultPageName("")

    .setContainsInclude(new ArrayList<String>())
    .addContainsInclude("")
    .setContainsExclude(new ArrayList<String>())
    .addContainsExclude("")
    .setMatchesInclude(new ArrayList<String>())
    .addMatchesInclude("")
    .setMatchesExclude(new ArrayList<String>())
    .addMatchesExclude("")
	
	.setLogger(null)
	.setDebug(false)
	.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({})
	.addCookie("", "");
JS
MethodsTypeNotesDefaultMandatory
setTrackIdstringEnter your Mapp Intelligence track ID provided by Mapp.emptyyes
setTrackDomainstringEnter your Mapp Intelligence tracking URL.emptyyes
setDomainArray<string | RegExp>Specify the domains you do not want to identify as an external referrer (e.g. your subdomains).

empty

no
addDomainstring | RegExpSpecify the domain you do not want to identify as an external referrer (e.g. your subdomains).emptyno
setUseParamsForDefaultPageNameArray<string>Includes specific URL parameter(s) in the default page name.emptyno
addUseParamsForDefaultPageNamestringIncludes specific URL parameter in the default page name.emptyno
setContainsIncludeArray<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
setContainsExcludeArray<string>Specify the strings that must be contained in the request URL to not measure the request.emptyno
addContainsExcludeRegExpSpecify the string that must be contained in the request URL to not measure the request.emptyno
setMatchesIncludeArray<RegExp>Specify the regular expressions that must be match the request URL to measure the request.emptyno
addMatchesIncludeRegExpSpecify the regular expression that must be match the request URL to measure the request.emptyno
setMatchesExcludeArray<RegExp>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
setAttemptTimeoutnumberSpecify the interval of request resend in milliseconds.100no
setMaxBatchSizenumberSpecify the maximum request number per batch.50no
setMaxQueueSizenumberSpecify the maximum number of requests saved in the queue.1000no
setMaxFileLinesnumberThe maximum number of maximal lines per file.10 * 1000no
setMaxFileDurationnumberThe maximum number of maximal file duration.30 * 60 * 1000no
setMaxFileSizenumberThe 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
setCookie{[key: string]: string}Enter a map of all origin client cookies.emptyno
addCookiestringEnter a origin client cookie (key, value).emptyno












const mappIntelligenceConfig = new MappIntelligenceConfig(
	"path/to/your/json/file/config.json"
);
JS
{
    "tracking": {
        "trackId": "111111111111111",
        "trackDomain": "analytics01.wt-eu02.net",
        "deactivate": false,
        "debug": false,
        "domain": [],
        "useParamsForDefaultPageName": [],
        "containsInclude": [],
        "containsExclude": [],
        "matchesInclude": [],
        "matchesExclude": []
    },
    "consumer": {
        "consumerType": "FILE",
        "filePath": "",
        "filePrefix": "",
        "maxAttempt": 1,
        "attemptTimeout": 100,
        "maxBatchSize": 50,
        "maxQueueSize": 1000,
        "maxFileLines": 10000,
        "maxFileDuration": 1800000,
        "maxFileSize": 25165824,
        "forceSSL": true
    }
}
JS
const mappIntelligenceConfig = new MappIntelligenceConfig(
	"path/to/your/js/file/config.js"
);
JS
import {MappIntelligenceConsumerType} from '@mapp-intelligence/node';

module.exports = {
    tracking: {
        trackId: '111111111111111',
        trackDomain: 'analytics01.wt-eu02.net',
        deactivate: false,
        debug: false,
        domain: [],
        useParamsForDefaultPageName: [],
        containsInclude: [],
        containsExclude: [],
        matchesInclude: [],
        matchesExclude: []
    },
    consumer: {
        consumerType: MappIntelligenceConsumerType.FILE,
        filePath: '',
        filePrefix: '',
        maxAttempt: 1,
        attemptTimeout: 100,
        maxBatchSize: 50,
        maxQueueSize: 1000,
        maxFileLines: 10000,
        maxFileDuration: 1800000,
        maxFileSize: 25165824,
        forceSSL: true
    }
};
JS