customer
    • 6 Minutes to read
    • Dark
      Light

    customer

    • Dark
      Light

    Article summary

    What can you do?

    Improve User Identification

    To improve user identification, you can use customer IDs in addition to Mapp's long-term cookies. This allows cross-device and cross-browser user identification. 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.

    Enable User Matching with Mapp Engage

    You can configure User matching (including user creation) with Mapp Engage. Find more information on Mapp Cloud User Matching on this page.

    Send additional user-specific information

    Track additional user-specific information via categories that help you to analyze and segment users.

    Parameter overview

    Parameter

    Description

    Data available

    id

    A unique identifier of the user (e.g., a hashed email address). it is necessary to encrypt data and ensure the data 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.

    Mapp Intelligence

    emailRID

    The e-mail receiver ID of the user serves as a link between Mapp Intelligence and your email tool (e.g., Mapp Engage).

    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

    The e-mail opt-in status of the user (1 = Yes | 2 = No | 3= unknown). Only relevant, if you are not using Mapp Engage.

    registrationEmail

    The Email address used to identify the user in Mapp Engage.

    Request Parameter: er1

    Mapp Engage

    registrationGroupId

    Provide the group ID in case of a new registration for the user in Mapp Engage.

    Request Parameter: er2

    registrationMode

    Provide the registration method used to register for marketing activities.

    • c (CONFIRMED OPT IN)
      New contacts receive a welcome message via email when they are added to the group. The contact does not need to confirm the subscription.

    • d (DOUBLE OPT IN)
      New contacts receive an invitation to join the group via email. The contact must accept the invitation before they are added to the group. Learn more here: Set up Double Opt-in with the Email Channel.

    • o (OPT IN)
      (default) New contacts are added to the group without notification.

    Request Parameter: er3

    registrationFirstName

    First name of the user to be used in Mapp Engage.

    Request Parameter: er4

    registrationLastName

    Last name of the user to be used in Mapp Engage.

    Request Parameter: er5

    registrationGender

    Gender of the user.

    • u: undisclosed

    • f: female

    • m: male

    Request Parameter: er6

    registrationTitle

    The title of the user to be used in Mapp Engage.

    Request Parameter: er7

    registrationOptin

    Provide information that the user consented to use their data.

    • true: User consent

    • false: No consent (default)

    Only when set to ‘true’, data will be sent to Mapp Engage.

    -

    category

    Categories can be used for additional information of the user. Categories have to be activated and set up in the configuration (see How to set up categories). When configuring the pixel, you need to use the ID as set up in the 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).

    Mapp Intelligence

    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,
     *      [registrationEmail='']: string,
     *      [registrationGroupId=""]: string,
     *      [registrationMode=""]: string,
     *      [registrationFirstName=""]: string,
     *      [registrationLastName=""]: string,
     *      [registrationGender=""]: string,
     *      [registrationTitle=""]: string,
     *      [registrationOptin=false]: boolean,
     *      [category={}]: {[number]: string}
     * }} data
     *
     * @returns {wtSmart.customer.data}
     */
    wtSmart.customer.data.set(data);

    add

    /**
     * @param {{
     *      [id]: string,
     *      [emailRID]: string,
     *      [emailOptin]: boolean,
     *      [registrationEmail='']: string,
     *      [registrationGroupId=""]: string,
     *      [registrationMode=""]: string,
     *      [registrationFirstName=""]: string,
     *      [registrationLastName=""]: string,
     *      [registrationGender=""]: string,
     *      [registrationTitle=""]: string,
     *      [registrationOptin=false]: boolean,
     *      [category]: {[number]: string}
     * }} data
     *
     * @returns {wtSmart.customer.data}
     */
    wtSmart.customer.data.add(data);

    get

    /**
     * @returns {{
     *      id: string,
     *      emailRID: string,
     *      emailOptin: boolean,
     *      registrationEmail: string,
     *      registrationGroupId: string,
     *      registrationMode: string,
     *      registrationFirstName: string,
     *      registrationLastName: string,
     *      registrationGender: string,
     *      registrationTitle: string,
     *      registrationOptin: boolean,
     *      category: {[number]: string}
     * }}
     */
    wtSmart.customer.data.get();

    remove

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

    Example object data

    // set customer data
    wtSmart.customer.data.set({
    	id: 'user5684798169',
    	emailRID: '',
    	emailOptin: true,
    	registrationEmail: 'john.doe@mapp.com',
    	registrationGroupId: '123456',
    	registrationMode: 'o',
    	registrationFirstName: 'John',
    	registrationLastName: 'Doe',
    	registrationGender: 'm',
    	registrationTitle: '',
        registrationOptin: 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 registrationFirstName, and registrationLastName from customer data
    wtSmart.customer.data.remove(['registrationFirstName', 'registrationLastName']);

    category

    set

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

    add

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

    get

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

    remove

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

    Example object category

    // 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]);

    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