Skip to content

@tripo3d/lens / index / AttributionPlugin

Class: AttributionPlugin ​

Defined in: src/plugins/attribution/index.ts:24

落地页归因插件:渠道解析、白名单判定、窗口去重、landing 上报,setup 内自动触发,业务无需手动调用。 只 emit,上报成功通知由 L1 onReported 统一承担。

Implements ​

Constructors ​

Constructor ​

ts
new AttributionPlugin(): AttributionPlugin;

Returns ​

AttributionPlugin

Properties ​

PropertyModifierTypeDefault valueDescriptionDefined in
namereadonly"attribution"'attribution'插件唯一名,重复注册报错src/plugins/attribution/index.ts:25

Methods ​

setup() ​

ts
setup(ctx): void;

Defined in: src/plugins/attribution/index.ts:32

注入上下文并 fire-and-forget 触发首访 landing 捕获;不阻塞 init,异常经 reportError 兜底不外抛

Parameters ​

ParameterType
ctxPluginContext

Returns ​

void

Implementation of ​

TracePlugin.setup


teardown() ​

ts
teardown(): void;

Defined in: src/plugins/attribution/index.ts:37

注销清理:destroy 时调用

Returns ​

void

Implementation of ​

TracePlugin.teardown

基于 MIT 协议发布(内部使用)