curl --request POST \
--url https://api.example.com/track \
--header 'Content-Type: <content-type>' \
--data '
{
"name": "<string>",
"namespace": "<string>",
"timestamp": {},
"properties": {},
"anonymousId": "<string>",
"sessionId": "<string>",
"websiteId": "<string>",
"source": "<string>"
}
'{
"status": "<string>",
"type": "<string>",
"count": 123,
"message": "<string>"
}Send custom events to track user actions and behaviors
curl --request POST \
--url https://api.example.com/track \
--header 'Content-Type: <content-type>' \
--data '
{
"name": "<string>",
"namespace": "<string>",
"timestamp": {},
"properties": {},
"anonymousId": "<string>",
"sessionId": "<string>",
"websiteId": "<string>",
"source": "<string>"
}
'{
"status": "<string>",
"type": "<string>",
"count": 123,
"message": "<string>"
}The track endpoint allows you to send custom events with optional properties to track specific user actions and behaviors in your application.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/databuddy-analytics/Databuddy/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header. The API key must have the track:events scope.website_id as a query parameter for client-side tracking.application/jsonsuccess or errorcustom_eventerror)curl -X POST https://api.databuddy.io/track \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "button_clicked",
"namespace": "ui",
"properties": {
"button_id": "signup",
"page": "/pricing"
},
"anonymousId": "user-123",
"sessionId": "session-456"
}'
{
"status": "success",
"type": "custom_event",
"count": 1
}
curl -X POST https://api.databuddy.io/track \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"name": "page_viewed",
"properties": {
"path": "/dashboard"
}
},
{
"name": "feature_used",
"namespace": "product",
"properties": {
"feature": "export",
"format": "csv"
}
}
]'
{
"status": "success",
"type": "custom_event",
"count": 2
}
curl -X POST https://api.databuddy.io/track?website_id=550e8400-e29b-41d4-a716-446655440000 \
-H "Content-Type: application/json" \
-d '{
"name": "video_played",
"properties": {
"video_id": "intro-2024",
"duration": 120
}
}'
{
"status": "error",
"message": "Invalid request body"
}
{
"status": "error",
"message": "API key or website_id required"
}
{
"status": "error",
"message": "API key missing track:events scope"
}
{
"status": "error",
"message": "Website not found"
}