Advanced Settings
    • 7 Minutes to read
    • Dark
      Light

    Advanced Settings

    • Dark
      Light

    Article summary

    1 Overview

    The advanced object allows developers to fine-tune tracking behavior in Mapp Intelligence. It includes optional configuration settings that go beyond basic tracking, covering advanced scenarios such as privacy handling, data consistency, and performance optimization.

    To make these options easier to navigate, we’ve grouped them into three categories:

    • Security & Privacy: Options that affect cookie behavior, anonymous tracking, and opt-out handling.

    • Tracking Behavior & Logic: Settings that influence how and when data is tracked (e.g., tab handling, pre-rendering, or request obfuscation).

    • Performance Optimization: Mechanisms to limit requests, cache tracking data, or queue them in offline scenarios.

    These settings are optional and should only be used when needed. Most setups only require basic configuration via the init object.


    2 Tracking Configuration

    2.1 Security & Privacy

    These settings enhance data security and provide control over how personal data is collected and handled. Use them to configure cookie behavior, obfuscation techniques, and user anonymity options.

    Configuration option

    Description

    secureCookie

    Adds the secure flag to all client-side Mapp Intelligence cookies. Use only if your entire website uses HTTPS.

    optOutName

    Allows you to rename the opt-out cookie.

    userIdentification.enableAnonymousFunction

    Enables the anonymous tracking option, allowing users to opt out of user-identifiable tracking.

    userIdentification.anonymousCookieName

    Renames the cookie used for anonymous tracking. Defaults to miCookieOptOut.

    userIdentification.anonymousOptIn

    Enables anonymous tracking by default. No user-identifiable cookie is set unless the user opts in.

    userIdentification.suppressParameter

    Defines parameters to exclude when the user has opted out of identifiable tracking.

    userIdentification.temporarySessionId

    Temporarily links actions during one session without storing a persistent ID.

    userIdentification.saveTemporarySessionId

    Stores the temporary session ID in the session storage so it persists across page views within a session.

    2.2 Tracking Behavior & Logic

    These options control how tracking behaves in specific browser or user scenarios. Use them to fine-tune how page views are registered, pre-rendered content is handled, and how product data is merged.

    Configuration option

    Description

    requestObfuscation

    Obfuscates all tracking requests by randomizing the parameter order and adding a string to the endpoint, making it harder for adblockers to detect.

    registerObfuscation

    Obfuscates personal data sent to Engage during registration.

    forceOldEverId

    Forces use of the previous version of the Ever ID.

    tabBrowsing

    Defines how tabbed browsing is handled. Learn more.

    preRendering

    Controls whether pre-rendered (background-loaded) pages are tracked. Learn more.

    useHashForDefaultPageName

    Includes the URL hash in the automatically generated page name.

    useParamsForDefaultPageName

    Includes specific URL parameters in the default page name.

    productMerge

    Prevents merging of multiple products with the same ID.

    2.3 Performance Optimization

    These settings help manage request frequency and ensure data is sent even under challenging network conditions. Use them to avoid tracking overloads, configure offline queues, and enable server-side communication.

    Configuration option

    Description

    requestQueue.activated

    Enables queuing of requests while offline.

    requestQueue.ttl

    Time to keep failed requests in queue (ms).

    requestQueue.resendInterval

    Time between retries for sending queued requests (ms).

    requestQueue.size

    Maximum number of requests allowed in the queue.

    requestQueue.retries

    Maximum number of retries per request/session. -1 means unlimited retries.

    requestQueue.retriesOption

    Defines retry limit type: 1 per request, 2 per session.

    requestLimit.activated

    Activates global request throttling.

    requestLimit.amount

    Maximum number of requests allowed.

    requestLimit.duration

    Duration (in seconds) in which the request limit applies.

    sendViaSDK

    Enables sync sending of data from WebViews to Mapp SDK (for mobile app use).

    sendViaServer.activated

    Enables server-to-server tracking functionality.

    sendViaServer.serverDomain

    Defines the domain where the S2S library is hosted.

    sendViaServer.serverPath

    Defines the path where the S2S library is hosted.

    sendViaServer.droppedRequests

    Choose which types of requests should be dropped (0 = none, 1 = orders, 2 = products, 3 = page views).

    sendViaServer.blacklist

    Define content IDs to exclude from tracking. Requires droppedRequests to be set accordingly.


    3 Available Methods

    The advanced object contains the following four methods:

    Method

    Description

    set

    Overwrites all existing values.

    add

    Overwrites only the corresponding values.

    get

    Returns the current configuration.

    remove

    Removes the current configuration or individual values.

    /**
     * @param {{
     *      [secureCookie=false]: boolean,
     *      [optOutName=webtrekkOptOut]: string,
     *      [requestObfuscation=false]: boolean,
     *      [registerObfuscation=false]: boolean,
     *      [forceOldEverId=false]: boolean,
     *      [tabBrowsing=true]: boolean,
     *      [preRendering=true]: boolean,
     *      [execCDB=true]: boolean,
     *      [useCDBCache=false]: boolean,
     *      [sendViaSDK=false]: boolean,
     *      [sendViaServer]: {
     *          [activated=false]: boolean,
     *          [serverDomain='']: string,
     *          [serverPath='']: string,
     *          [droppedRequests=0]: number,
     *          [blacklist=[/.+/]]: string[]|RegExp[]
     *      },
     *      [useHashForDefaultPageName=false]: boolean,
     *      [useParamsForDefaultPageName=[]]: string[],
     *      [requestQueue]: {
     *          [activated=true]: boolean,
     *          [ttl=5*60*1000]: number,
     *          [resendInterval=5*1000]: number,
     *          [size=100]: number,
     *          [retries=-1]: number,
     *          [retriesOption=1]: number
     *      },
     *      [requestLimit]: {
     *          [activated=true]: boolean,
     *          [amount=1000]: number,
     *          [duration=30*60]: number
     *      },
     *      [userIdentification]: {
     *          [enableAnonymousFunction=false]: boolean,
     *          [anonymousCookieName=miCookieOptOut]: string,
     *          [anonymousOptIn=false]: boolean,
     *          [suppressParameter=[]]: string[],
     *          [temporarySessionId='']: string,
     *          [saveTemporarySessionId=false]: boolean
     *      }
     * }} data
     *
     * @returns {wtSmart.advanced}
     */
    wtSmart.advanced.set(data);
    /**
     * @param {{
     *      [secureCookie]: boolean,
     *      [optOutName]: string,
     *      [requestObfuscation]: boolean,
     *      [registerObfuscation]: boolean,
     *      [forceOldEverId]: boolean,
     *      [tabBrowsing=true]: boolean,
     *      [preRendering=true]: boolean,
     *      [execCDB]: boolean,
     *      [useCDBCache]: boolean,
     *      [sendViaSDK]: boolean,
     *		[sendViaServer]: {
     *          [activated]: boolean,
     *          [serverDomain]: string,
     *          [serverPath]: string,
     *          [droppedRequests]: number,
     *          [blacklist]: string[]|RegExp[]
     *      },
     *      [useHashForDefaultPageName]: boolean,
     *      [useParamsForDefaultPageName]: string[],
     *      [requestQueue]: {
     *          [activated]: boolean,
     *          [ttl]: number,
     *          [resendInterval]: number,
     *          [size]: number,
     *          [retries]: number,
     *          [retriesOption]: number
     *      },
     *      [requestLimit]: {
     *          [activated]: boolean,
     *          [amount]: number,
     *          [duration]: number
     *      },
     *		[userIdentification]: {
     *			[enableAnonymousFunction]: boolean,
     *			[anonymousCookieName]: string,
     *			[anonymousOptIn]: boolean,
     *			[suppressParameter]: string[]
     *          [temporarySessionId]: string,
     *          [saveTemporarySessionId]: boolean
     *		}
     * }} data
     *
     * @returns {wtSmart.advanced}
     */
    wtSmart.advanced.add(data);
    /**
     * @returns {{
     *      secureCookie: boolean,
     *      optOutName: string,
     *      requestObfuscation: boolean,
     *      registerObfuscation: boolean,
     *      forceOldEverId: boolean,
     *      tabBrowsing: boolean,
     *      preRendering: boolean,
     *      execCDB: boolean,
     *      useCDBCache: boolean,
     *      sendViaSDK: boolean,
     *		sendViaServer: {
     *          activated: boolean,
     *          serverDomain: string,
     *          serverPath: string,
     *          droppedRequests: number,
     *          blacklist: RegExp[]
     *      },
     *      useHashForDefaultPageName: boolean,
     *      useParamsForDefaultPageName: string[],
     *      requestQueue: {
     *          activated: boolean,
     *          ttl: number,
     *          resendInterval: number,
     *          size: number,
     *          retries: number,
     *          retriesOption: number
     *      },
     *      requestLimit: {
     *          activated: boolean,
     *          amount: number,
     *          duration: number
     *      },
     *		userIdentification: {
     *			enableAnonymousFunction: boolean,
     *			anonymousCookieName: string,
     *			anonymousOptIn: boolean,
     *			suppressParameter: string[]
     *          temporarySessionId: string,
     *          saveTemporarySessionId: boolean
     *		}
     * }}
     */
    wtSmart.advanced.get();
    /**
     * @param {string[]} [removeList]
     *
     * @returns {wtSmart.advanced}
     */
    wtSmart.advanced.remove(removeList);

    Example

    window.wtSmart = window.wtSmart || [];
    window.wtSmart.push(function(wtSmart) {
    	// set advanced config
    	wtSmart.advanced.set({
    		secureCookie: false,
    		optOutName: 'webtrekkOptOut',
    		requestObfuscation: false,
            registerObfuscation: true,
    		forceOldEverId: false,
    		tabBrowsing: true,
    		preRendering: true,
    		execCDB: true,
    		useCDBCache: false,
    		sendViaSDK: true,
    		sendViaServer: {
            	activated: true,
                serverDomain: 'sub.domain.tld',
                serverPath: 'path/to/my/s2s/lib',
                droppedRequests: 3,
                blacklist: ['*']
            },
        	useHashForDefaultPageName: true,
        	useParamsForDefaultPageName: ['param1'],
    		requestQueue: {
            	activated: false,
            	ttl: 5 * 60 * 1000,
            	resendInterval: 5 * 1000,
            	size: 100,
                retries: -1,
                retriesOption: 1
        	},
     		requestLimit: {
    			activated: true,
    			amount: 1000,
    			duration: 30*60
    		},
     		userIdentification: {
    			enableAnonymousFunction: true,
    			anonymousCookieName: 'miCookieOptOut',
    			anonymousOptIn: true,
    			suppressParameter: ['cd', 'uc5', 'uc7']
    		}
    	});
    
    	// add advanced config
    	wtSmart.advanced.add({
    		useCDBCache: true
    	});
    
    	// get advanced config
    	var config = wtSmart.advanced.get();
      
    	// remove complete advanced config
    	wtSmart.advanced.remove();
    
    	// remove only optOutName from advanced config
    	wtSmart.advanced.remove(['optOutName']);
    });

    4 Code Generator

    Use the code generator to create individual code that you can then integrate directly into the website.


    Was this article helpful?


    ESC

    AI Assistant, facilitating knowledge discovery through conversational intelligence