Documentation Index
Fetch the complete documentation index at: https://docs.dema.ai/llms.txt
Use this file to discover all available pages before exploring further.
Supported event types
Prerequisites
Request details
Event examples
Schema reference
Supported event types
The V2 API expects at minimum the following event types:page_view
view_item
purchase
view_item_list
select_item
add_to_cart
remove_from_cart
view_cart
add_to_wishlist
remove_from_wishlist
begin_checkout
event_name value beyond the ones listed above, and Dema can build custom metrics on top of it. The available fields per event are defined by the event data schema.
Prerequisites
- Your unique Dema ID, formatted as
DV-XXXXXXXXXXXXXXXXXXXXXXXX
Response
The API returns an HTTP200 status code with an empty response body on success.
Request details
Endpoint
- URL:
https://tracker.dema.ai/api/track
HTTP methods
Both GET and POST methods are supported.Required request parameters
| Parameter | Description |
|---|---|
i | Your unique Dema ID. |
uid | Unique user ID for the event, a UUID managed server-side. Must be a valid UUIDv4 string. Should remain consistent across events for the same user. |
_nc | No-cache parameter. Current timestamp in milliseconds since epoch. |
v | Version of your tracking integration (e.g., "2.0.0"). Use your own versioning scheme. |
Event details
For GET requests, event details are passed as a URL-encoded JSON string in them query parameter.
For POST requests, event details are sent as a JSON body with the Content-Type: application/json header.
Event details must conform to the TrackedEventData schema. See the Event data schema reference section for the full schema and field descriptions.
Event examples
page_view
A basic page view event:curl examples for page_view
curl examples for page_view
view_item
Sent when a user views a product detail page:page_view event and a view_item event. This is different from the deprecated V1 API, where a single pageview event covered both.curl examples for view_item
curl examples for view_item
purchase
A purchase event, sent when a user completes a transaction:curl examples for purchase
curl examples for purchase
view_item_list
Sent when a user views a list of products (e.g., a category page or search results):curl examples for view_item_list
curl examples for view_item_list
select_item
Sent when a user selects a product from a list (e.g., a category page or search results). Theindex reflects the position where the item was presented to the user:
curl examples for select_item
curl examples for select_item
add_to_cart
Sent when a user adds a product to their cart:curl examples for add_to_cart
curl examples for add_to_cart
remove_from_cart
Sent when a user removes a product from their cart:curl examples for remove_from_cart
curl examples for remove_from_cart
view_cart
Sent when a user views their shopping cart:curl examples for view_cart
curl examples for view_cart
add_to_wishlist
Sent when a user adds a product to their wishlist:curl examples for add_to_wishlist
curl examples for add_to_wishlist
remove_from_wishlist
Sent when a user removes a product from their wishlist:curl examples for remove_from_wishlist
curl examples for remove_from_wishlist
begin_checkout
Sent when a user starts the checkout process:curl examples for begin_checkout
curl examples for begin_checkout
Event data schema reference
The event detail payload must conform to the TrackedEventData schema. Below is a summary of the available fields.View full TrackedEventData JSON schema
View full TrackedEventData JSON schema
Event fields
Required fields
Required fields
page_view, view_item, purchase).Page & navigation fields
Page & navigation fields
Client & location fields
Client & location fields
Event detail fields
Event detail fields
EXCLUDED to prevent the order from appearing in the platform.EUR, USD).Custom attributes
Custom attributes
Item fields (items[])
Required fields
Required fields
Optional fields
Optional fields
select_item it represents the item’s position in the list; in add_to_cart it represents the item’s position in the cart.Voucher fields (vouchers[])
Required fields
Required fields
Additional notes
- Ensure all URL parameters are properly URL-encoded when using GET requests.
- The
uid(unique user ID) must be managed server-side. This ID should be a valid UUIDv4 and remain consistent across events to accurately track user behavior.

