The init object is needed to initialize tracking. The following configuration options are available:

Configuration optionsDescription
trackId

Enter your Track ID here. If the same information should be sent to several accounts, simply enter the corresponding Track IDs separated by a comma.

How to get the Track ID:
  1. Log in Mapp Q3 and go to Configuration > System Configuration > Data Collection.
  2. Here, you will find your account ID as "Your Track ID".
trackDomain

Enter the domain, where the data should be sent to. If you are using a Mapp Intelligence Track Domain, you will find it in the setup information, which has been sent to you via email.

domain

By default, the domain that includes the Smart Pixel is not counted as a referrer in Mapp Intelligence. Here you can override this setting.

Add all (sub)domains that should be excluded from this analyses (e.g. your own domain, payment providers etc.). Enter as a comma-seperated list of domains and subdomains without http(s). You can use regular expressions and wildcards (*).

Always enter the domains without "http://" and "https://"
cookiePlease indicate if you want to set the cookie via the browser or the server. We only recommend using server-side cookies if you are using a custom Track Domain and the Track Domain is the same as your web domain. This allows first-party tracking and the highest data quality.


1st / 3rd party cookies

By default, first-party cookies are used. When using first-party cookies, all cookies will be set client-side by your website. With third-party cookies, Mapp Intelligence sets the cookie server-side.

Acceptance of first-party cookies is generally higher than for third-party cookies. The disadvantage of first-party cookies is that they only are valid for one domain. Hence, when you use them, visits on websites distributed across multiple domains (e.g. www.website.com and www.website-special.com) cannot be tracked as a continuous visit. Tracking switches between various sub-domains (e.g. www1.website.com and www2.website.com) or HTTP/HTTPS are supported.

This does not affect the cookie settings of the user, but the way cookies are set via Mapp Intelligence. When using first-party cookies, the pixel sets a cookie to recognize a (returning) user. When using third-party cookies, the Mapp Intelligence track server sets the necessary cookie and saves it into the track domain.

Methods

The init object contains the following methods:

MethodDescription

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 {{
 *      trackId: string | string[],
 *      trackDomain: string,
 *      [domain=document.location.hostname]: string | string[] | RegExp | RegExp[],
 *      [cookie="1"]: string
 * }} data
 *
 * @returns {wtSmart.init}
 */
wtSmart.init.set(data);
JS

add

/**
 * @param {{
 *      [trackId]: string | string[],
 *      [trackDomain]: string,
 *      [domain]: string | string[] | RegExp | RegExp[],
 *      [cookie]: string
 * }} data
 *
 * @returns {wtSmart.init}
 */
wtSmart.init.add(data);
JS

get

/**
 * @returns {
 *      trackId: string,
 *      trackDomain: string,
 *      domain: string[] | RegExp[],
 *      cookie: string
 * }
 */
wtSmart.init.get();
JS

remove

/**
 * @param {string[]} [removeList]
 *
 * @returns {wtSmart.init}
 */
wtSmart.init.remove(removeList);
JS

Example

window.wtSmart = window.wtSmart || [];
window.wtSmart.push(function(wtSmart) {
	// set initial tracking config
	wtSmart.init.set({
		trackId: '111111111111111',
		trackDomain: 'q3.webtrekk.net',
		domain: [
            document.location.host,
            '*.domain.tld',
            'sub.another-domain.*'
        ],
		cookie: '1'
	});

	// add initial tracking config
	wtSmart.init.add({
		trackId: ['222222222222222', '111111111111111']
	});

	// get initial tracking config
	var config = wtSmart.init.get();

	// remove complete initial tracking config
	wtSmart.init.remove();

	// remove only domain from initial tracking config
	wtSmart.init.remove(['domain']);
});
JS