--- title: "User" slug: "customer-1" description: "Track user data with the Node.js Library: customer ID, email receiver ID, opt-in, gender, address details and user categories via MappIntelligenceCustomer." status: "update" updated: 2026-11-02T16:55:46Z published: 2026-11-02T16:55:46Z canonical: "docs.mapp.com/customer-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # User User tracking in Mapp Intelligence enables you to identify visitors based on unique customer information rather than relying solely on cookies. This ensures consistent user recognition, even when cookies are deleted, browsers are switched, or users access your website from different devices. > [!WARNING] > Note on Data Privacy > > Always transmit personal information in encrypted or hashed form. > > Mapp recommends using SHA256 or MD5 hashing to ensure compliance with data-protection standards. User data can be sent to Mapp Intelligence after a successful login, registration, or purchase. Each user is identified through a **Customer ID** and can optionally be enriched with **User Categories** for segmentation and analysis. --- ## Customer ID The Customer ID serves as a unique identifier for a user. It can be: - a customer number from your CRM or shop system, or - the user’s email address. > [!NOTE] > Note > > If an email address is used, it must be encrypted or hashed before transmission to comply with data-protection requirements. Mapp recommends using SHA256 or MD5 hashing to ensure that the email address cannot be read directly. --- ## User Categories User Categories capture additional attributes about a user, for example loyalty level, subscription type, or login source. They allow you to enrich user profiles with contextual or behavioral data for deeper segmentation and analysis. They must also be configured in Mapp Q3 before tracking. Find more information [here](/v1/docs/how-to-set-up-custom-parameters). When implementing, include the **ID number** and the **value** as a string. --- **Supported Methods** | **Method** | **Description** | **Where to configure *** | **Where to analyze** | | --- | --- | --- | --- | | **constructor** | Initializes a user object and defines the unique Customer ID. | – | *Visitors > User Relationship Management > Custom Visitor ID* | | **setId** | Sets the Customer ID, a unique identifier from your CRM, shop system, or hashed email address. | – | *Visitors > User Relationship Management > Custom Visitor ID* | | **setCustomIdentifier** | Defines a secondary unique identifier for the user (optional). | – | *Visitors > User Relationship Management > Custom Visitor ID* | | **setEmail** | Transmits the user’s email address. Hash or encrypt the address before you pass it, the library does not hash it. | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setEmailRID** | Transmits the user’s email receiver ID for linking marketing communications with behavior data. | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setEmailOptin** | Tracks whether the user has granted email permission (opt-in status). | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setFirstName** | Transmits the user’s first name. | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setLastName** | Transmits the user’s last name. | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setTelephone** | Transmits the user’s telephone number. | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setGender** | Tracks the user’s gender (1 = male, 2 = female). | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setBirthday** | Transmits the user’s date of birth (YYYYMMDD). | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setCountry** | Transmits the user’s country. | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setCity** | Transmits the user’s city. | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setPostalCode** | Transmits the user’s postal code. | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setStreet** | Transmits the user’s street. | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setStreetNumber** | Transmits the user’s street number. | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setValidation** | Enables validation for overwriting existing user category values. | – | *Visitors > User Relationship Management > [Name of User Category]* | | **setCategory** | Adds or updates a User Category to describe additional user attributes. User Categories must be created beforehand in Mapp Intelligence. | UC > New Category | *Visitors > User Categories > [Name of Category]* | * **Configuration Path Abbreviations:** - **UC** = *Mapp Q3 > Configuration > Categorization > URM Categories > …* #### Generated request parameters | **Method** | **Request parameter** | **Constant** | | --- | --- | --- | | **constructor** / **setId** | `cd` | `CUSTOMER_ID` | | **setCustomIdentifier** | `ceid` | `CUSTOM_EVER_ID` | | **setEmail** | `uc700` | `EMAIL` | | **setEmailRID** | `uc701` | `EMAIL_RID` | | **setEmailOptin** | `uc702` | `EMAIL_OPTIN` | | **setFirstName** | `uc703` | `FIRST_NAME` | | **setLastName** | `uc704` | `LAST_NAME` | | **setTelephone** | `uc705` | `TELEPHONE` | | **setGender** | `uc706` | `GENDER` | | **setBirthday** | `uc707` | `BIRTHDAY` | | **setCountry** | `uc708` | `COUNTRY` | | **setCity** | `uc709` | `CITY` | | **setPostalCode** | `uc710` | `POSTAL_CODE` | | **setStreet** | `uc711` | `STREET` | | **setStreetNumber** | `uc712` | `STREET_NUMBER` | | **setValidation** | `uc713` | `CUSTOMER_VALIDATION` | | **setCategory** | `uc<ID>` | `CUSTOM_URM_CATEGORY` | > [!NOTE] > Note > > Values that are empty or exactly `0`, `0.0`, `false` or `{}` are not transmitted. For example, `setEmailOptin(false)` is not sent, so an opt-out cannot be transmitted this way, and neither is a category with the value `0` or `false`. To transmit such a value, send the request with a parameter map (see Request Parameters). **Methods** constructor ```javascript const mappCustomerData = new MappIntelligenceCustomer(); ``` ```javascript /** * @param i Use this to transmit a unique identifier of the user */ const mappCustomerData = new MappIntelligenceCustomer(i: string); ``` setId ```javascript /** * @param i Use this to transmit a unique identifier of the user * * @return this */ mappCustomerData.setId(i: string); ``` setCustomIdentifier ```javascript /** * @param c Use this to transmit a unique custom identifier of the user * * @return this */ mappCustomerData.setCustomIdentifier(c: string); ``` setEmail ```javascript /** * @param e Use this to transmit the e-mail address of the user * * @return this */ mappCustomerData.setEmail(e: string); ``` setEmailRID ```javascript /** * @param eRID Use this to transmit the e-mail receiver ID of the user * * @return this */ mappCustomerData.setEmailRID(eRID: string); ``` setEmailOptin ```javascript /** * @param eOptin Use this to transmit the e-mail opt-in status of the user * * @return this */ mappCustomerData.setEmailOptin(eOptin: boolean); ``` setFirstName ```javascript /** * @param fName Use this to transmit the first name of the user * * @return this */ mappCustomerData.setFirstName(fName: string); ``` setLastName ```javascript /** * @param lName Use this to transmit the last name of the user * * @return this */ mappCustomerData.setLastName(lName: string); ``` setTelephone ```javascript /** * @param t Use this to transmit the telephone number of the user * * @return this */ mappCustomerData.setTelephone(t: string); ``` setGender ```javascript /** * @param g Use this to transmit the gender of the user (1 = male | 2 = female) * * @return this */ mappCustomerData.setGender(g: number); ``` setBirthday ```javascript /** * @param b Use this to transmit the user's date of birth (YYYYMMDD) * * @return this */ mappCustomerData.setBirthday(b: string); ``` setCountry ```javascript /** * @param c Use this to transmit the country of the user * * @return this */ mappCustomerData.setCountry(c: string); ``` setCity ```javascript /** * @param c Use this to transmit the city of the user * * @return this */ mappCustomerData.setCity(c: string); ``` setPostalCode ```javascript /** * @param pCode Use this to transmit the postal code of the user * * @return this */ mappCustomerData.setPostalCode(pCode: string); ``` setStreet ```javascript /** * @param s Use this to transmit the street of the user * * @return this */ mappCustomerData.setStreet(s: string); ``` setStreetNumber ```javascript /** * @param sNumber Use this to transmit the street number of the user * * @return this */ mappCustomerData.setStreetNumber(sNumber: string); ``` setValidation ```javascript /** * @param v Overwrites existing URM categorize * * @return this */ mappCustomerData.setValidation(v: boolean); ``` setCategory ```javascript /** * The optional category (User Relation Management) can be used to categorize a customer. URM categories must be * created in the tool first of all. * * @param i     ID of the parameter * @param value Value of the parameter * * @return this */ mappCustomerData.setCategory(i: number, value: string); ``` **Example** ```javascript const mic = new MappIntelligenceConfig( "111111111111111", "analytics01.wt-eu02.net" ); const mit = new MappIntelligenceTracking(mic); const mappCustomerData = new MappIntelligenceCustomer(); mappCustomerData.setId("user5684798169") .setEmailRID("rid12345") .setEmailOptin(true) .setGender(1) .setBirthday("~!jX7E0tqd3BTIXVNX+jJnOQ==!~") // 19900215 [ JJJJMMDD ] .setCountry("~!epld8YhkcFY=!~") // Germany .setCity("~!9Hn50gRUKpw=!~") // Berlin .setPostalCode("~!dZVg2aMOE2Q=!~") // 10115 .setStreet("~!vOSHjdTscdK8BCw0pNyQ2lcLKg5PY70N!~") // Robert-Koch-Platz .setValidation(true) .setCategory(5, "login"); await mit.track((new MappIntelligenceDataMap()).customer(mappCustomerData)); await mit.close(); ```