Skip to content

Commit 78b5069

Browse files
committed
fix: docs
1 parent 9e3f76c commit 78b5069

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

apps/basket/src/routes/basket.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ async function insertCustomEvent(
311311
customData.eventId,
312312
VALIDATION_LIMITS.SHORT_STRING_MAX_LENGTH
313313
);
314-
q
314+
q;
315315
if (!eventId) {
316316
eventId = randomUUID();
317317
}

apps/docs/content/docs/api.mdx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ Track custom events programmatically using the basket endpoint.
249249
language="json"
250250
code={`{
251251
"type": "custom",
252-
"eventId": "evt_12345",
253252
"name": "purchase",
254253
"anonymousId": "anon_user_123",
255254
"sessionId": "session_456",
@@ -268,7 +267,6 @@ Track custom events programmatically using the basket endpoint.
268267
language="json"
269268
code={`{
270269
"type": "custom",
271-
"eventId": "evt_simple_123",
272270
"name": "newsletter_signup",
273271
"properties": {
274272
"source": "footer_form"
@@ -288,7 +286,6 @@ Track custom events programmatically using the basket endpoint.
288286
code={`[
289287
{
290288
"type": "custom",
291-
"eventId": "evt_12345",
292289
"name": "purchase",
293290
"anonymousId": "anon_user_123",
294291
"sessionId": "session_456",
@@ -301,7 +298,6 @@ Track custom events programmatically using the basket endpoint.
301298
},
302299
{
303300
"type": "custom",
304-
"eventId": "evt_12346",
305301
"name": "signup",
306302
"anonymousId": "anon_user_124",
307303
"sessionId": "session_457",
@@ -316,7 +312,6 @@ Track custom events programmatically using the basket endpoint.
316312

317313
**Required Fields:**
318314
- `type`: Must be "custom"
319-
- `eventId`: Unique identifier for the event (max 512 characters) - used for deduplication (auto-generated if empty)
320315
- `name`: Event name (1-128 characters)
321316

322317
**Optional Fields:**
@@ -326,12 +321,9 @@ Track custom events programmatically using the basket endpoint.
326321
- `properties`: JSON object with custom event properties
327322

328323
<Callout type="tip">
329-
**Simple tracking**: For basic event tracking, you only need `type`, `eventId`, and `name`. The `anonymousId` and `sessionId` are useful for user journey tracking but not required for simple conversion or action tracking.
324+
**Simple tracking**: For basic event tracking, you only need `type` and `name`. The `anonymousId` and `sessionId` are useful for user journey tracking but not required for simple conversion or action tracking.
330325
</Callout>
331326

332-
<Callout type="info">
333-
**Event ID Generation**: The `eventId` is a custom string you provide for deduplication. It can be any unique identifier (UUID, timestamp-based, etc.). If you send the same `eventId` twice, the second event will be ignored. This prevents duplicate events from network retries or accidental double-sends.
334-
</Callout>
335327

336328
**Response:**
337329

0 commit comments

Comments
 (0)