Skip to main content

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

  • User-Agent: Client’s User Agent string to be included in the request 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: Unique user ID for the event, a UUID managed server-side.
  • _nc: Current timestamp.
  • 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, and CLIENT-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 should be consistent across different events to track user behavior accurately.