--- title: "Product" slug: "product-1" description: "Track product views, cart actions and purchases with the Node.js Library: product ID, cost, quantity, status, categories and parameters." status: "update" updated: 2026-11-02T16:55:08Z published: 2026-11-02T16:55:08Z canonical: "docs.mapp.com/product-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. # Product Mapp Intelligence enables detailed tracking of product interactions across the entire shopping journey. Each product event is assigned a **product status** that defines the context in which a product is viewed or interacted with. This allows you to analyze user behavior from the first product impression to the final purchase. --- ## Product Status The following product statuses are supported in Mapp Intelligence: | **Product Status** | **Description** | | --- | --- | | **VIEW** | Product viewed on a product detail page. | | **BASKET** | Product added to a shopping cart. | | **ADD_TO_WISHLIST** | Product added to a wishlist. | | **DELETE_FROM_WISHLIST** | Product removed from a wishlist. | | **ADD_TO_CART** | Product added to a shopping cart. | | **DELETE_FROM_CART** | Product removed from a shopping cart. | | **CHECKOUT** | Product moved to checkout. | | **CONFIRMATION** | Product purchased. | Mapp Intelligence can automatically detect **abandoned shopping carts** when products are tracked with the relevant statuses, but no purchase confirmation follows. --- ## Categories Product categories define fixed classifications for products and enable structured analysis. These groups must be configured in Mapp Q3 before being tracked via the library. Find more information [here](/v1/docs/how-to-set-up-categories). When implementing, include the **ID number** and the respective **value** as a string. The value should not exceed 255 characters; additional characters are truncated. > [!NOTE] > Note > > Categories are assigned once to a product. If a product is tracked with a category, all subsequent product calls will also be assigned to this category. Only the first tracked value will be shown. Mapp therefore recommends implementing products and categories while embedding the library. See also [How can I replace missing values ("-") in categories?](/v1/docs/how-can-i-replace-missing-values-in-categories) --- ## Parameters E-Commerce Parameters enrich tracked product data with additional website-specific information or metrics. They must be configured in Mapp Q3 before they can be tracked via the library. During setup, you define the data type (text or number) and other attributes for each parameter. Mapp Intelligence provides a range of predefined E-Commerce Parameters for common product-related use cases, such as *Product Sold Out*, *Product on Sale*, and *Category*. Alternatively, you can create custom E-Commerce Parameters to capture completely individual product information — for example, product size, color, brand, or campaign-specific attributes. For detailed setup instructions and a full overview of predefined parameters, see [How to set up custom parameters](/v1/docs/how-to-set-up-custom-parameters). --- --- **Supported Methods** | **Method** | **Description** | **Where to configure *** | | --- | --- | --- | | **constructor** | Initializes a product object. A product ID is required and may not exceed 110 characters. | – | | **setId** | Defines the unique product identifier (e.g. SKU or article number). Required for all product measurements. | – | | **setCost** | Sets the total price of the product. “0” values are allowed. For multiple quantities, use the total price, not the unit price. | – | | **setQuantity** | Defines the quantity of the product. | – | | **setStatus** | Defines the product status. The following values are supported: - VIEW - BASKET - ADD_TO_CART - DELETE_FROM_CART - CHECKOUT - CONFIRMATION - ADD_TO_WISHLIST - DELETE_FROM_WISHLIST | – | | **setVariant** | Transmits the variant of the product, for example color or size. | EP > Product variant | | **setSoldOut** | Indicates whether the product is sold out (true) or in stock (false). | *EP > Product sold out* | | **setParameter** | Adds product-specific parameters to enrich tracking data. | *EP > Own Configuration* | | **setCategory** | Assigns a product category for structured grouping and analysis. | *PC > New Category* | * **Configuration Path Abbreviations:** - **EP** = *Mapp Q3 > Configuration > Custom Parameters > E-Commerce Parameters > Preconfigured > …* - **PC** = *Mapp Q3 > Configuration > Categorization > Product Categories > …* #### Generated request parameters | **Method** | **Request parameter** | **Constant** | | --- | --- | --- | | **constructor** / **setId** | `ba` | `PRODUCT_ID` | | **setCost** | `co` | `PRODUCT_COST` | | **setQuantity** | `qn` | `PRODUCT_QUANTITY` | | **setStatus** | `st` | `PRODUCT_STATUS` | | **setVariant** | `cb767` | `PRODUCT_VARIANT` | | **setSoldOut** | `cb760` (`1` = sold out, `0` = in stock) | `PRODUCT_SOLD_OUT` | | **setParameter** | `cb<ID>` | `CUSTOM_PRODUCT_PARAMETER` | | **setCategory** | `ca<ID>` | `CUSTOM_PRODUCT_CATEGORY` | **Methods** constructor ```javascript const mappProductData = new MappIntelligenceProduct(); ``` ```javascript /** * @param i Saves products placed in the shopping cart. This property must be entered if products are to be *          measured. A product ID may not contain more than 110 characters */ const mappProductData = new MappIntelligenceProduct(i: string); ``` setId ```javascript /** * @param i Saves products placed in the shopping cart. This property must be entered if products are to be *          measured. A product ID may not contain more than 110 characters * * @return MappIntelligenceProduct */ mappProductData.setId(i: string); ``` setCost ```javascript /** * @param c Contains the product price ("0" prices are allowed). If you transmit a product several times *          (quantity property greater than 1), use the total price not the unit price * * @return MappIntelligenceProduct */ mappProductData.setCost(c: number); ``` setQuantity ```javascript /** * @param q Contains the product quantity * * @return MappIntelligenceProduct */ mappProductData.setQuantity(q: number); ``` setStatus ```javascript /** * @param s Contains states of your product: MappIntelligenceProduct.VIEW, BASKET, CONFIRMATION, *          ADD_TO_CART, DELETE_FROM_CART, CHECKOUT, ADD_TO_WISHLIST or DELETE_FROM_WISHLIST *          (other values are ignored) * * @return MappIntelligenceProduct */ mappProductData.setStatus(s: string); ``` setVariant ```javascript /** * @param v Use this to transmit the variant of the product * * @return MappIntelligenceProduct */ mappProductData.setVariant(v: string); ``` setSoldOut ```javascript /** * @param sOut Use this to transmit the product is sold out or in stock (sold out = true, in stock = false) * * @return MappIntelligenceProduct */ mappProductData.setSoldOut(sOut: boolean); ``` setParameter ```javascript /** * You can use parameters to enrich analytical data with your own website-specific information and/or metrics. * * @param i ID of the parameter * @param v Value of the parameter * * @return MappIntelligenceProduct */ mappProductData.setParameter(i: number, v: string); ``` setCategory ```javascript /** * Product categories allow the grouping of products. * * @param i ID of the parameter * @param v Value of the parameter * * @return MappIntelligenceProduct */ mappProductData.setCategory(i: number, v: string); ``` **Example** ```javascript const mic = new MappIntelligenceConfig( "111111111111111", "analytics01.wt-eu02.net" ); const mit = new MappIntelligenceTracking(mic); const mappProductData = new MappIntelligenceProduct(); mappProductData.setId("id of a product") .setCost(19.95) .setQuantity(5) .setStatus(MappIntelligenceProduct.VIEW) .setSoldOut(true) .setParameter(2, "parameter 2") .setParameter(15, "parameter 15") .setCategory(2, "category 2") .setCategory(15, "category 15"); const mappProductCollection = new MappIntelligenceProductCollection(); mappProductCollection.add(mappProductData); await mit.track((new MappIntelligenceDataMap()).product(mappProductCollection)); await mit.close(); ```