콘텐츠로 이동

이벤트 설계

종류 이름 정의 주체 예시
System Event $로 시작 ABTO $pageview, $autocapture
Custom Event $로 시작하지 않음 고객 제품 checkout_completed

Custom Event 이름과 property는 고객 저장소의 abto.events.ts에 선언합니다.

export const events = defineEvents({
checkout_completed: {
properties: {
order_id: { type: 'string', required: true },
amount: { type: 'number', required: true },
currency: { type: 'string', enum: ['KRW', 'USD'], required: true },
},
},
});
상황 Development Production
미등록 event 전송, 발견 경고 drop
required/type/enum 위반 전송, drift 경고 drop
schema에 없는 일반 property 전송 전송
$ Custom Property 전송하지 않음 전송하지 않음

$ namespace는 ABTO 시스템 계약을 위한 공간입니다. 타입을 우회한 JavaScript payload라도 runtime에서 보호합니다.

SDK는 event마다 UUIDv7을 만들고 durable outbox에 보관합니다. 네트워크 오류나 408, 429, 5xx는 같은 UUID로 재시도합니다. Analytics는 (project_id, event_id)로 중복 저장을 막습니다.