To improve customer identification, you can use customer IDs in addition to Mapp's long-term cookies ("eid"). The reason for this is that some users or programs automatically delete long-term cookies once a session (visit) ends. Without customer IDs, returning customers will not be identified. Learn more about User-centric tracking here.

Customer IDs can be passed to the Smart Pixel following a successful login or completed order, for example. These customer IDs can be evaluated in the Mapp tool under Visitors > Visitors > Last Custom Visitor IDs.

  • id: Use this to transmit a unique identifier of the user.
  • emailRID: Use this to transmit the e-mail receiver ID of the user.

    If you are using Mapp Engage, it gets automatically filled with the Mapp Engage contact ID when a user clicks an email. This allows for identifying users between Mapp Intelligence and Mapp Engage.

  • emailOptin: Use this to transmit the e-mail opt-in status of the user (1 = Yes | 2 = No | 3= unknown).
  • gender: Use this to transmit the gender of the user (1 = male | 2 = female | 3= unknown).
  • birthday: Use this to transmit the user's date of birth (YYYYMMDD).
  • country: Use this to transmit the country of the user.
  • city: Use this to transmit the city of the user.
  • street: Use this to transmit the street of the user.
  • category: The optional category (User Relation Management) can be used to categorize a customer. URM categories must be created in the tool first of all.

ID

A customer ID can be a unique identifier from your shop or CMS system, or the customer's e-mail address. If the latter, it is necessary to encrypt the e-mail address and ensure the e-mail address is unreadable (e.g. using the MD5 or SHA256 hash) to comply with data protection requirements.

If you use an unhashed e-mail address as customer ID, the Smart Pixel automatically generates a SHA256 hash and uses that as the customer ID.

Category

Categories can be used for additional information of the customer. Categories have to be activated and set up in the configuration (Configuration > Categorisation > URM Categories) before they can be collected. When configuring the pixel, you need to use the ID as set up in the account configuration as a number and the respective value as a string.

It is recommended to transmit hashed personal data that is not evaluated in terms of content (e.g. with the SHA256 hash). If you would like to collect this data for analytical reasons, we recommend that you transmit the data in encrypted form (see the document Encryption of Tracking Data).

Methods

The customer object contains the following four methods, which are contained in the objects data and category:

  • set: Overwrites all existing values.
  • add: Overwrites only the corresponding values.
  • get: Returns the current configuration.
  • remove: Removes the current configuration or individual values.

data

set

/**
 * @param {{
 *      [id=""]: string,
 *      [emailRID=""]: string,
 *      [emailOptin=false]: boolean,
 *      [gender=0]: number,
 *      [birthday=""]: string,
 *      [country=""]: string,
 *      [city=""]: string,
 *      [postalCode=""]: string,
 *      [street=""]: string,
 *      [validation=false]: boolean,
 *      [category={}]: {[number]: string}
 * }} data
 *
 * @returns {wtSmart.customer.data}
 */
wtSmart.customer.data.set(data);
JS

add

/**
 * @param {{
 *      [id]: string,
 *      [emailRID]: string,
 *      [emailOptin]: boolean,
 *      [gender]: number,
 *      [birthday]: string,
 *      [country]: string,
 *      [city]: string,
 *      [postalCode]: string,
 *      [street]: string,
 *      [validation=false]: boolean,
 *      [category]: {[number]: string}
 * }} data
 *
 * @returns {wtSmart.customer.data}
 */
wtSmart.customer.data.add(data);
JS

get

/**
 * @returns {{
 *      id: string,
 *      emailRID: string,
 *      emailOptin: boolean,
 *      gender: number,
 *      birthday: string,
 *      country: string,
 *      city: string,
 *      postalCode: string,
 *      street: string,
 *      validation: boolean,
 *      category: {[number]: string}
 * }}
 */
wtSmart.customer.data.get();
JS

remove

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

Example

// set customer data
wtSmart.customer.data.set({
	id: 'user5684798169',
	emailRID: '',
	emailOptin: true,
	gender: 1,
	birthday: '~!jX7E0tqd3BTIXVNX+jJnOQ==!~', // 19900215 [ JJJJMMDD ]1
	country: '~!epld8YhkcFY=!~', // Germany
	city: '~!9Hn50gRUKpw=!~', // Berlin
	postalCode: '~!dZVg2aMOE2Q=!~', // 10115
	street: '~!vOSHjdTscdK8BCw0pNyQ2lcLKg5PY70N!~', // Robert-Koch-Platz
	validation: true,
	category: {
		5: 'login'
	}
});

// add customer data
wtSmart.customer.data.add({
	emailRID: 'foo.bar'
});

// get customer data
var data = wtSmart.customer.data.get();
  
// remove all customer data
wtSmart.customer.data.remove();

// remove only city, country and birthday from customer data
wtSmart.customer.data.remove(['city', 'country', 'birthday']);
JS

category

set

/**
 * @param {{[number]: string}} data
 *
 * @returns {wtSmart.customer.category}
 */
wtSmart.customer.category.set(data);
JS

add

/**
 * @param {{[number]: string}} data
 *
 * @returns {wtSmart.customer.category}
 */
wtSmart.customer.category.add(data);
JS

get

/**
 * @returns {{[number]: string}}
 */
wtSmart.customer.category.get();
JS

remove

/**
 * @param {number[]} [removeList]
 *
 * @returns {wtSmart.customer.category}
 */
wtSmart.customer.category.remove(removeList);
JS

Example

// set customer category
wtSmart.customer.category.set({
    1: 'login'
});

// add customer category
wtSmart.customer.category.add({
    7: 'foo.bar'
});

// get customer category
var data = wtSmart.customer.category.get();
  
// remove all customer category
wtSmart.customer.category.remove();

// remove only customer category 7
wtSmart.customer.category.remove([7]);
JS