Standalone Tracking

Prev Next

1 Overview

Standalone Tracking is the script-based implementation of Mapp Fashion tracking. It uses a dedicated JavaScript loader that runs independently of the Mapp Intelligence Pixel and handles all core tracking functions on the website. This includes initializing the tracking library, capturing page views and product interactions, and maintaining session and user context required for recommendations and measurement.


2 Implementation

This section explains how to initialize the tracking library and how default page view tracking works.


2.1 Initialization

Add the following loader snippet to your website before the closing </head> tag.

This initializes the tracking library and ensures tracking begins as soon as possible.

(function(D, r, e, s, S, i, p, I) {
 D.DressipiLoaderObjectName = i;
 D[i] = D[i] || function() {
 (D[i].q = D[i].q || []).push(arguments);
 };
 D[i].l = 1 * new Date();
 D[i]('config', 'set', 'host', S);
 p = r.createElement(e);
 I = r.getElementsByTagName(e)[0];
 p.async = 1;
 p.src = s;
 I.parentNode.insertBefore(p, I);
})(window, document, 'script', 'https://static.dressipi.com/dressipi.v3.js', 
'https://dressipi.example.com', 'Dressipi');

After loading the tracking library, set your namespace and trigger the initial page view:

Dressipi('config', 'set', 'namespace_id', '0699d521-eebd-43a9-8543-9d3a704ab427');
Dressipi('track', 'pageView');

This automatically starts session tracking and records the initial page view event.


2.2 Default Page View Tracking

The default pageView event records key information about the page the shopper is visiting, including device details, referrer, and session context.
This event is sent automatically after initialization, but you can also trigger it manually if needed.

Tip:

Always trigger a pageView before any other event such as PDP, PLP, or order tracking to ensure proper session linking.


2.2.1 Example Request Body

{
 "schema": "iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",
 "data": [
   {
     "e": "pp",
     "url": "https://www.example.com/p/high-neck-print-maxi-dress",
     "page": "High Neck Print Maxi Dress | Example Store",
     "refr": "https://www.example.com/",
     "eid": "e2cdb374-8a97-4d66-b63f-9dd3ba65b9bf",
     "tv": "js-3.8.0",
     "tna": "dressipi",
     "aid": "0699d521-eebd-43a9-8543-9d3a704ab427",
     "p": "web",
     "cookie": "1",
     "cs": "UTF-8",
     "lang": "en-US",
     "res": "1920x1243",
     "cd": "30",
     "dtm": "1749733951080",
     "vp": "904x1079",
     "ds": "889x4039",
     "vid": "1",
     "sid": "c5248318-f25e-41f1-8635-cefa79a9f1e9",
     "duid": "0355592c-a158-4378-afc9-556e1d4d34a1",
     "stm": "1749733951081"
   }
 ]
}

2.2.2 Parameter Meanings

Key

Description

e

Event type – "pv" stands for Page View; "pp" stands for Page Ping (used for time-on-page tracking).

url

Full URL of the page being viewed.

page

Page title (the content of the <title> tag).

refr

Referrer URL – the page the visitor came from.

eid

Event ID – unique identifier for this event.

tv

Tracker version

tna

Tracker namespace

aid

Application ID – the customer-specific ID used in configuration.

p

Platform – "web" for browser tracking.

cookie

Indicates whether cookies are enabled (1 = yes, 0 = no).

cs

Character set of the page (e.g., "UTF-8").

lang

Browser language setting (e.g., "en-US").

res

Screen resolution in pixels (e.g., "1920x1243").

cd

Color depth (bits per pixel, e.g., "30").

dtm

Device timestamp (milliseconds since epoch).

cx

Base64-encoded JSON containing additional context (e.g., page or user data).

vp

Viewport dimensions (visible browser area).

ds

Document size (total scrollable area).

vid

Visit count – increments on each session.

sid

Session ID – identifies the current visit.

duid

Domain user ID – persistent ID for the same browser.

stm

Timestamp when the event was sent.


3 Available Tracking Methods

The following table lists all standard Dressipi.js tracking methods. Each method can be triggered using:

Dressipi('track', '<method>', { ...parameters });

Method

Description

Smart Pixel Equivalent

init

Initializes configuration settings

init, advanced, extension config

pageView

Captures page information

page

addToBasket

Logs when a product is added to the cart

product status addToCart + multi-value ec

removeFromBasket

Logs when a product is removed from the cart

product status removeFromCart + multi-value ec

identify

Identifies the customer via email or customer ID

customer

plp

Tracks product list page (PLP) interactions

pl extension, product status list + multi-value ec

pdp / itemView

Tracks product detail page (PDP) interactions

product status view + multi-value ec

order

Confirms order completion

product status confirmation & order + multi- & single-value ec

itemClickPDP

Logs product clicks on the PDP

custom event

itemClickQuickView

Logs product clicks within sets or quick views

custom event

carouselNavigate

Tracks carousel gallery navigation (next/previous slide)

custom event

carouselPaginate

Tracks carousel pagination (current page change)

custom event

tabClick

Tracks tab clicks

custom event


3.1 Session and Visit Information

Dressipi.js automatically tracks:

  • Session ID (sid): Resets each visit.

  • Domain User ID (duid): Persistent per browser.

  • Visit Count (vid): Increments automatically with each return visit.

  • Device and browser information: Screen resolution, viewport size, language, and color depth.

  • Referrer URL: Captured on every page view.

No manual setup is required — these values are included automatically with each tracked event.


4 Best Practices

  • Always trigger a pageView before any product or basket events.

  • Use identify when the user logs in or completes an order to link activity across sessions.

  • Verify that your configuration (namespace_id and host) matches your integration setup.

  • Keep event triggers simple. Dressipi.js handles the structure and submission automatically.