User Tracking
Track users in LangDB AI Gateway to analyze usage, optimize performance, and improve chatbot experiences.
Example: Chatbot Analytics with User Tracking
curl 'https://api.us-east-1.langdb.ai/v1/chat/completions' \
-H 'authorization: Bearer LangDBApiKey' \
-H 'Content-Type: application/json' \
-d '{
"model": "openai/gpt-4o-mini",
"stream": true,
"messages": [
{
"role": "user",
"content": "Def bubbleSort()"
}
],
"extra": {
"user": {
"id": "7",
"name": "mrunmay",
"tags": ["coding", "software"]
}
}
}'User Tracking Fields
Fetching User Analytics & Usage Data
Last updated
Was this helpful?