원하는 패키지 매니저로 프로젝트에 SDK를 추가하세요.
npm install @tracio/angularyarn add @tracio/angularpnpm add @tracio/angular최소한의 설정으로 시작하고 실행하세요.
import { Component, inject, effect } from '@angular/core'import { TracioService } from '@tracio/angular'@Component({ ... })export class AppComponent { private tracio = inject(TracioService) constructor() { // visitorId() is a signal — read it reactively effect(() => console.log(this.tracio.visitorId())) }}오류 처리, 로딩 상태, 고급 구성을 갖춘 프로덕션 준비 패턴.
import { Component, inject } from '@angular/core'import { TracioService } from '@tracio/angular'@Component({ selector: 'app-protected', template: ` <div *ngIf="tracio.result() as result"> <p>Visitor: {{ result.visitorId }}</p> <p>Bot: {{ result.bot.detected ? 'detected' : 'clear' }} ({{ result.bot.confidence }}/100)</p> </div> `,})export class ProtectedComponent { // provideTracio({ publicKey }) is registered in app.config.ts readonly tracio = inject(TracioService)}SDK를 초기화하고 구성하기 위한 모든 옵션.
publicKeystring대시보드에서 발급받은 공개 키 — 브라우저에 실어 보내도 안전합니다endpointstring프록시 라우팅 배포를 위한 사용자 지정 엔드포인트 URL — 명시적 URL이 region보다 우선합니다regionstring데이터 리전: us 또는 eutimeoutMsnumbergetResult() 호출 전체에 대한 타임아웃(밀리초)linkedIdstring로그인한 사용자의 내부 계정 ID — 같은 디바이스를 공유하는 방문을 연결할 수 있습니다tagstring식별 요청에 붙이는 자유 형식 라벨 (예: checkout 또는 login)debugboolean스크립트 수명 주기와 네트워크 활동을 브라우저 콘솔에 기록합니다scriptUrlstring에이전트 스크립트 URL 전체 재정의 — 셀프 호스팅 또는 Subresource Integrity용전체 API 레퍼런스, 웹훅 구성, 고급 가이드로 더 깊이 알아보세요.