Advanced configuration settings
    • 8 Minutes to read
    • Dark
      Light

    Advanced configuration settings

    • Dark
      Light

    Article summary

    The advanced object contains advanced tracking configuration possibilities with following options:

    Configuration options

    Description

    secureCookie

    Adds the "secure" flag to all client-side Mapp Intelligence cookies.  A secure cookie can only be transmitted over an encrypted connection (HTTPS).

    Use this feature only if your entire website is accessible via SSL. If you are not sure if this is the case for your website, don't use this flag.

    optOutName

    Alternative name for the opt-out cookie.

    requestObfuscation

    Obfuscates all track requests to make it harder for adblockers to identify and block Mapp Intelligence track requests.

    • Random string appended after tracking endpoint ("wt")

    • Random order of all tracking parameters (including "p")

    This feature is deactivated by default and can be activated with the "requestObfuscation" key.

    forceOldEverId

    Forces to use the old Mapp Intelligence EverID.

    execCDB (deprecated)

    Activates / deactivates the Cross Device Bridge.

    useCDBCache (deprecated)

    Activates / deactivates the image cache for the Cross Device Bridge.

    product Merge

    With this option you can deactivate the merging of several products with the same product id

    sendViaSDK

    Activates / deactivates the Web-to-App tracking functionality.  This is relevant if you want to track WebViews in your mobile app using the Smart Pixel.

    This function enables synchronous sending of requests to Mapp Intelligence when your users open web content directly in the app. Only in this way can the analysis data be evaluated correctly. An example of this is the display of visits to previous or subsequent pages in chronological order. This also helps to ensure that the correct user path is displayed in the path analysis and that the customer journey is evaluated correctly.

    This function is disabled by default.

    Please note that activating this feature can lead to a slightly increased security risk when exchanging data. This is because the pixel creates a data exchange to your SDK (which you use to track the app) and does not send the data directly to your Mapp Intelligence account.

    sendViaServer

    Support server-to-server tracking functionality.

    • activated

    Activate pixel configuration to support server-to-server tracking.

    • serverDomain

    Indicate the domain where the server-to-server library is hosted. If you leave it empty the requests are sent to the Mapp Intelligence trackserver directly and not via the server to server library.

    • serverPath

    Indicate the path where the server-to-server library is saved on your server. If you leave it empty the requests are sent to the Mapp Intelligence trackserver directly and not via the server-to-server library.

    • droppedRequests

    Discard pixel requests:

    • 0: None

    • 1: Orders

    • 2: Products

    • 3: All page requests

    Indicate the type of requests that have to be discarded by the pixel. It is possible to further narrow down the requests if you indicate specific content IDs under Discard specific requests.

    • blacklist

    Indicate specific page requests that need to be discarded by the pixel. Please note:

    • If you would like to only discard a specific order or product request, you need to set Discard pixel requests to Orders or Products, respectively and indicate the specific content ID of the order or product to be discarded here.

    • If you like to only discard a specific page request, you need to set Discard pixel requests to All page requests and indicate the content ID to be discarded here.

    useHashForDefaultPageName

    Includes the URL hash in the default page name.

    useParamsForDefaultPageName

    Includes specific URL parameter(s) in the default page name.

    requestQueue

    Offline queue for all tracking requests.

    • activated

    Activates / deactivates the offline tracking functionality.

    • ttl

    Specifies the maximum time of a request to be stored in the queue (in seconds).

    • resendInterval

    Specifies the interval between resend attempts, if the request failed to sent (in milliseconds).

    • size

    Specifies the maximum number of possible requests saved in the queue.

    • retries

    Specifies the maximum number of retries before the request is deleted or no more requests are sent for the entire session. The default value is -1, which means infinite retries.

    • retriesOption

    Specifies the option of retries:

    • 1: The limit is set for each request

    • 2: The limit is set for the entire session

    requestLimit

    The maximum number of permissible requests is limited in order to reduce the risk of sending large numbers of requests in error. This could be caused by an incorrect pixel implementation or by bot traffic. As soon as the standard limit of 1000 requests (pages and events) every 30 minutes is exceeded, no further requests are sent by the pixel for the remaining time.

    • activated

    Activates / deactivates the request limitation.

    • amount

    Maximum number of requests permitted to be sent in the specified time period.

    • duration

    Time interval in seconds for sending the maximum X number of requests.

    userIdentification

    Anonymised tracking.

    • enableAnonymousFunction

    Enable if you want to give users the option to opt-out of user-identifiable cookies and parameters when tracking. By default, this function will still track with user-identifiable cookies, but the user can opt-out using the respective function.

    • anonymousCookieName

    Alternative name for the anonymous tracking cookie. If you do not provide a name, miCookieOptOut will be used.

    • anonymousOptIn

    Enable if you want to use anonymous tracking by default. Enabling this option will not set any user-identifiable cookie until the user actively agrees to its usage.

    • suppressParameter

    It is possible to exclude additional parameters if the user sets the user-identifiable opt-out cookie. Please indicate the respective parameters in the array.

    • temporarySessionId

    In order to keep the session and the user during a single session, we offer the possibility to set a temporary session ID that keeps the session together but is not permanently stored on a device.

    • saveTemporarySessionId

    If you enable this option, the temporary session ID will be stored in the session storage, so you don't have to set it on every page.

    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.

    set

    /**
     * @param {{
     *      [secureCookie=false]: boolean,
     *      [optOutName=webtrekkOptOut]: string,
     *      [requestObfuscation=false]: boolean,
     *      [forceOldEverId=false]: 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);

    add

    /**
     * @param {{
     *      [secureCookie]: boolean,
     *      [optOutName]: string,
     *      [requestObfuscation]: boolean,
     *      [forceOldEverId]: 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);

    get

    /**
     * @returns {{
     *      secureCookie: boolean,
     *      optOutName: string,
     *      requestObfuscation: boolean,
     *      forceOldEverId: 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();

    remove

    /**
     * @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,
    		forceOldEverId: false,
    		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']);
    });

    Code Generator

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


    Was this article helpful?

    What's Next