Intempt Docs

Track Events API for Recommendations

Send product interaction events directly to Intempt's recommendation engine via the Track API.

Track Events API for Recommendations

The Track Events API lets you send product interaction events directly to Intempt's recommendation engine. These events power recommendation feeds including Recently Viewed, Recently Added to Cart, and purchase-based recommendations.


Endpoint

POST https://api.intempt.com/v1/{orgName}/projects/{projName}/sources/{sourceId}/track
ParameterDescription
orgNameYour organization name
projNameYour project name
sourceIdThe source identifier

Supported Event Names

The name field must exactly match one of these four values:

Event NamePowers
Product viewedRecently Viewed feed, view-based models
Added to cartRecently Added to Cart feed, cart-based logic
Removed from cartCart-based feed accuracy, cart state consistency
Product orderedPurchase-based models, post-purchase recommendations

Request Body

{
  "track": [
    {
      "name": "EVENT_NAME",
      "payload": [
        {
          "eventId": "unique-event-id",
          "userId": "user-identifier",
          "data": {
            "productId": "product-identifier"
          }
        }
      ]
    }
  ]
}

Field Reference

FieldRequiredDescription
nameYesEvent name — must exactly match one of the four supported names
eventIdYesUnique identifier per event — used for deduplication
userIdYes*User identifier. At least one identity field required.
anotherUserIdNoSecondary user ID for identity linking
accountIdNoAccount/organization identifier
data.productIdYesProduct identifier — mandatory for all recommendation events

* At least one of userId, anotherUserId, or accountId must be provided.

data.productId is required. Events without productId will not power recommendation feeds. It cannot be renamed or mapped from another field name.


Examples

Product Viewed

{
  "track": [
    {
      "name": "Product viewed",
      "payload": [
        {
          "eventId": "evt_view_001",
          "userId": "user_123",
          "data": {
            "productId": "SKU_987"
          }
        }
      ]
    }
  ]
}

Added to Cart

{
  "track": [
    {
      "name": "Added to cart",
      "payload": [
        {
          "eventId": "evt_cart_001",
          "userId": "user_123",
          "data": {
            "productId": "SKU_987"
          }
        }
      ]
    }
  ]
}

Removed from Cart

{
  "track": [
    {
      "name": "Removed from cart",
      "payload": [
        {
          "eventId": "evt_remove_001",
          "userId": "user_123",
          "data": {
            "productId": "SKU_987"
          }
        }
      ]
    }
  ]
}

Product Ordered

{
  "track": [
    {
      "name": "Product ordered",
      "payload": [
        {
          "eventId": "evt_order_001",
          "userId": "user_123",
          "data": {
            "productId": "SKU_987"
          }
        }
      ]
    }
  ]
}

Notes

  • Each eventId must be unique across all submissions — duplicates are deduplicated
  • productId must live inside the data object — it cannot be at the root level
  • Use Recommendation Events Mapping if you want to map existing custom events without changing your tracking code

On this page