Supported data types
Pageviews
Product page visits
Orders
Purchase transactions
Prerequisites
- The product ID must match the one in your e-commerce system
- Your unique Dema ID, formatted as
DV-XXXXXXXXXXXXXXXXXXXXXXXX
Request details
Endpoint
- URL:
https://tracker.dema.ai/track.js
HTTP method
- Method: GET
Headers
Request parameters
Common parameters for all events
e: Event type. Accepts"pageview"or"order".i: Your unique Dema ID.v: Version of your tracking script (e.g.,"1.0.0").uid: The visitor’s user ID, managed server-side. Must be a UUIDv4 in its standard text form (xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx) and stay the same for the visitor across events. Events whoseuidisn’t a valid UUID are discarded._nc: Cache-buster. Send a unique value with each request, such as the current timestamp in milliseconds. Dema doesn’t use it as the event time.u: The full URL of the page visited.r: The referring URL, if available.
Event-specific parameters
m: Additional event data in JSON string format.
Pageview event
For a pageview on a product page, include:Order event
For an order event, include detailed order information:Examples of curl requests
Replace placeholder values (YOUR-DEMA-ID, YOUR-UUID, YOUR-TIMESTAMP, VISITOR-IP, and VISITOR-USER-AGENT) with actual data specific to your implementation.
Additional notes
- Ensure all URL parameters are properly URL-encoded. The examples provided have been encoded accordingly.
- The management of the unique user ID (uid) must be handled server-side. This ID must be a UUIDv4 in its standard text form (
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx) and stay consistent across events to track user behavior accurately.

