diff --git a/apps/public/content/docs/api/track.mdx b/apps/public/content/docs/api/track.mdx index bd6982fe..8fcfcec8 100644 --- a/apps/public/content/docs/api/track.mdx +++ b/apps/public/content/docs/api/track.mdx @@ -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. + ### Identifying Users To identify a user: @@ -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: @@ -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. \ No newline at end of file + 4. Respect rate limits and implement exponential backoff for retries.