- 8 Minutes to read
- Print
- DarkLight
Advanced configuration settings
- 8 Minutes to read
- Print
- DarkLight
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).
|
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.
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.
|
sendViaServer | Support server-to-server tracking functionality. |
| Activate pixel configuration to support server-to-server tracking. |
| 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. |
| 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. |
| Discard pixel 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. |
| Indicate specific page requests that need to be discarded by the pixel. Please note:
|
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. |
| Activates / deactivates the offline tracking functionality. |
| Specifies the maximum time of a request to be stored in the queue (in seconds). |
| Specifies the interval between resend attempts, if the request failed to sent (in milliseconds). |
| Specifies the maximum number of possible requests saved in the queue. |
| 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. |
| Specifies the option of retries:
|
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. |
| Activates / deactivates the request limitation. |
| Maximum number of requests permitted to be sent in the specified time period. |
| Time interval in seconds for sending the maximum X number of requests. |
userIdentification | Anonymised tracking. |
| 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. |
| Alternative name for the anonymous tracking cookie. If you do not provide a name, miCookieOptOut will be used. |
| 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. |
| 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. |
| 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. |
| 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.