Skip to content

Docs: Add info about identification and timestamp in track call #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion apps/public/content/docs/api/track.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ curl -X POST https://api.openpanel.dev/track \
}'
```

To track events for an identified user, add `profileId` to the payload.

To specify a date/time for the tracked event (defaults to now), add `__timestamp` (formatted `YYYY-MM-DD HH:mm:ss` without tz) to properties.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not exactly true. Should be ISO 8601 format (2025-06-04T08:08:30.202Z).

Or mention that the datetime must be UTC


### Identifying Users

To identify a user:
Expand Down Expand Up @@ -123,6 +127,7 @@ curl -X POST https://api.openpanel.dev/track \
}'
```


### Error Handling
The API uses standard HTTP response codes to indicate the success or failure of requests. In case of an error, the response body will contain more information about the error.
Example error response:
Expand All @@ -142,4 +147,4 @@ Best Practices
1. Always use HTTPS to ensure secure communication.
2. Store your clientId and clientSecret securely and never expose them in client-side code.
3. Implement proper error handling in your applications.
4. Respect rate limits and implement exponential backoff for retries.
4. Respect rate limits and implement exponential backoff for retries.