refactor(collector): ♻️ Improve attribution tracking DTOs with new properties for sources and client device info
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
1bb24b5f71
commit
aa539aa6f4
2 changed files with 22 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsOptional, IsString } from 'class-validator';
|
||||
import { IsNumber, IsOptional, IsString } from 'class-validator';
|
||||
|
||||
/**
|
||||
* UTM attribution parameters (first-touch)
|
||||
|
|
@ -34,4 +34,14 @@ export class AttributionDto {
|
|||
@IsOptional()
|
||||
@IsString()
|
||||
referrer?: string;
|
||||
|
||||
@ApiProperty({ description: 'Landing page URL at time of attribution capture', required: false })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
landingPage?: string;
|
||||
|
||||
@ApiProperty({ description: 'Timestamp when attribution was captured (ms since epoch)', required: false })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
capturedAt?: number;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,8 +76,17 @@ export class ClientDeviceDto {
|
|||
@IsBoolean()
|
||||
cookiesEnabled?: boolean;
|
||||
|
||||
@ApiProperty({ description: 'Do Not Track header set', required: false })
|
||||
@ApiProperty({ description: 'Do Not Track header value', required: false })
|
||||
@IsOptional()
|
||||
doNotTrack?: string | boolean | null;
|
||||
|
||||
@ApiProperty({ description: 'Navigator platform string', required: false })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
platform?: string;
|
||||
|
||||
@ApiProperty({ description: 'Browser online status', required: false })
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
doNotTrack?: boolean;
|
||||
onLine?: boolean;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue