@tripo3d/trace / TripoTraceParams
Interface: TripoTraceParams
Defined in: trace/src/types.ts:19
TripoTrace 构造参数
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
baseUrl | string | 归因服务的 base URL,例如 'https://api-cn-test.tripo3d.com'(必填) | trace/src/types.ts:21 |
channels? | "baidu"[] | 启用的渠道列表,默认全部已注册渠道 | trace/src/types.ts:23 |
deviceIdOverride? | string | 显式传入 device id,跳过指纹计算(业务自管 id 时用) | trace/src/types.ts:25 |
fetch? | (input, init?) => Promise<Response> | 自定义 fetch 实现,Nuxt 项目可传 $fetch | trace/src/types.ts:27 |
onError? | (err, ctx) => void | 错误回调,默认静默 | trace/src/types.ts:29 |
onReport? | (payload, channel) => void | 上报成功钩子,便于业务做埋点链路监控 | trace/src/types.ts:31 |