Track Data
Ingest tracking events into Intempt via HTTP — real-time ingestion pipeline for processing, identity resolution, and analytics.
Track Data
POST/{orgName}/projects/{projectName}/sources/{sourceId}/trackIngests one or more tracking events in a single request. Use this endpoint to track events from backend or server-side systems, environments without Intempt SDK availability, or custom backends syncing behavioral, transactional, or lifecycle data.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
orgName | string | Yes | Organization name |
projectName | string | Yes | Project name |
sourceId | integer | Yes | Source identifier — represents the event data origin (web, backend, or integration) |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | API key used to authenticate the request and identify the source |
Request Body
Content-Type: application/json
Schema
{
"track": [
{
"name": "string",
"payload": [
{
"eventId": "string",
"userId": "string",
"timestamp": 1714631904000,
"accountId": "string",
"sessionId": "string",
"pageId": "string",
"anotherUserId": "string",
"anotherAccountId": "string",
"data": {},
"userAttributes": {},
"accountAttributes": {}
}
]
}
]
}Top-level Fields
| Field | Type | Required | Description |
|---|---|---|---|
track | array | Yes | List of event groups — each group has a name and payload |
Event Group Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Logical event name (e.g. Purchase, Signup, Subscription Updated) |
payload | array | No | Array of individual event occurrences |
Payload Object Fields
| Field | Type | Description |
|---|---|---|
eventId | string | Optional auto-generated UUID. For session/page events must match sessionId/pageId. |
userId | string | Unique user identifier (email, phone, or external ID). Required when profileId is null. |
timestamp | integer | Event timestamp in milliseconds. Defaults to current time if omitted. |
accountId | string | Account/group identifier (company name, domain, or external ID). |
sessionId | string | Groups multiple events within a single session. For session events, value should match eventId. |
pageId | string | Groups multiple events within a single page. For page events, value should match eventId. |
anotherUserId | string | Secondary user ID for merging profiles across different identifier types. |
anotherAccountId | string | Secondary account ID for merging accounts across different identifier types. |
data | object | Custom event attributes — no restrictions on types (e.g. purchaseAmount, locationLatitude). |
userAttributes | object | Custom user attributes. |
accountAttributes | object | Custom account attributes. |
Examples
Single Event — Purchase
{
"track": [
{
"name": "Purchase",
"payload": [
{
"eventId": "generated-event-id",
"userId": "custom@intempt.com",
"timestamp": 1714631904000,
"accountId": "Intempt",
"sessionId": "generated-session-id",
"pageId": "generated-page-id",
"anotherUserId": "+111111111",
"anotherAccountId": "no-reply@intempt.com",
"data": {
"amount": 150,
"productName": "Wine",
"quantity": 4,
"locationLatitude": 51.509865
},
"userAttributes": {
"location": "USA"
},
"accountAttributes": {
"founded": 2000
}
}
]
}
]
}Batch Events — Multiple Purchases
{
"track": [
{
"name": "Purchase",
"payload": [
{
"eventId": "evt_purchase_001",
"userId": "user1@example.com",
"timestamp": 1714631904000,
"sessionId": "sess_001",
"pageId": "checkout_page",
"data": {
"amount": 200,
"productName": "Whiskey",
"quantity": 2
}
},
{
"eventId": "evt_purchase_002",
"userId": "user2@example.com",
"timestamp": 1714631910000,
"sessionId": "sess_002",
"pageId": "checkout_page",
"data": {
"amount": 90,
"productName": "Beer",
"quantity": 6
}
}
]
}
]
}Multiple events of the same type in one request reduces network overhead and suits high-volume systems (orders, payments, imports). Each payload object is processed independently.
Multiple Event Types — Signup + Purchase
{
"track": [
{
"name": "Signup",
"payload": [
{
"eventId": "evt_signup_001",
"userId": "newuser@example.com",
"timestamp": 1714631800000,
"data": { "signupMethod": "email" },
"userAttributes": { "plan": "trial", "country": "IN" }
}
]
},
{
"name": "Purchase",
"payload": [
{
"eventId": "evt_purchase_003",
"userId": "newuser@example.com",
"timestamp": 1714631904000,
"data": { "amount": 120, "productName": "Vodka", "quantity": 1 }
}
]
}
]
}The track array can contain multiple groups with different names in a single request. Ideal for signup flows and onboarding pipelines.
Responses
200 OK
Event ingestion accepted.
{}400 Bad Request
Invalid request parameters or malformed payload.
{}Notes
- Authentication via
apiKeyquery parameter on every request - Partial validation is handled internally — the API may still return
200 OKfor some validation issues
