Webtrekk Smart Pixel on git


Example

// set advanced config
wtSmart.advanced.set({
    secureCookie: false,
    optOutName: 'webtrekkOptOut',
    requestObfuscation: false,
    forceOldEverId: false,
    execCDB: true,
    useCDBCache: false,
	sendViaSDK: false,
	useHashForDefaultPageName: true,
    useParamsForDefaultPageName: ['param1'],
    requestQueue: {
        activated: false,
        ttl: 5 * 60 * 1000,
        resendInterval: 5 * 1000,
        size: 100
    }
});

// add advanced config
wtSmart.advanced.set({
    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']);




MethodDescriptionSyntax
set

With the "set" method, the configuration is taken over. Thereby all existing values are overwritten. Non-configured values are taken over with the internal default values.

See Advanced: Configuration Options.

/**
 * @param {{
 *      [secureCookie=false]: boolean,
 *      [optOutName=webtrekkOptOut]: string,
 *      [requestObfuscation=false]: boolean,
 *      [forceOldEverId=false]: boolean,
 *      [execCDB=true]: boolean,
 *      [useCDBCache=false]: boolean,
 *		[sendViaSDK=false]: boolean,
 *		[useHashForDefaultPageName=false]: boolean,
 *      [useParamsForDefaultPageName=[]]: Array.<string>,
 *      [requestQueue]: {
 *          [activated=false]: boolean,
 *          [ttl=5*60*1000]: number,
 *          [resendInterval=5*1000]: number,
 *          [size=100]: number
 *      }
 * }} data
 *
 * @returns {wtSmart.advanced}
 */
wtSmart.advanced.set(data)
add

The add method adopts the configuration. Only the transferred values are overwritten. Non-configured values retain their old value.

See Advanced: Configuration Options.

/**
 * @param {{
 *      [secureCookie]: boolean,
 *      [optOutName]: string,
 *      [requestObfuscation]: boolean,
 *      [forceOldEverId]: boolean,
 *      [execCDB]: boolean,
 *      [useCDBCache]: boolean,
 *		[sendViaSDK=false]: boolean,
 *		[useHashForDefaultPageName=false]: boolean,
 *      [useParamsForDefaultPageName=[]]: Array.<string>,
 *      [requestQueue]: {
 *          [activated=false]: boolean,
 *          [ttl=5*60*1000]: number,
 *          [resendInterval=5*1000]: number,
 *          [size=100]: number
 *      }
 * }} data
 *
 * @returns {wtSmart.advanced}
 */
wtSmart.advanced.add(data)
get

The "get" method returns the current configuration.

See Advanced: Configuration Options.

/**
 * @returns {
 *      secureCookie: boolean,
 *      optOutName: string,
 *      requestObfuscation: boolean,
 *      forceOldEverId: boolean,
 *      execCDB: boolean,
 *      useCDBCache: boolean,
 *		[sendViaSDK=false]: boolean,
 *		[useHashForDefaultPageName=false]: boolean,
 *      [useParamsForDefaultPageName=[]]: Array.<string>,
 *      requestQueue: {
 *          activated: boolean,
 *          ttl: number,
 *          resendInterval: number,
 *          size: number
 *      }
 * }
 */
wtSmart.advanced.get()
removeWith the "remove" method, you can remove the current configuration or delete single values.
/**
 * @param {string[]} [removeList]
 *
 * @returns {wtSmart.advanced}
 */
wtSmart.advanced.remove(removeList);