humanbehavior-js
Version:
SDK for HumanBehavior session and event recording
59 lines • 1.59 kB
TypeScript
/**
* Automatic Property Detection for HumanBehavior SDK
* Captures device type, location, and initial referrer information
*/
export interface DeviceInfo {
device_type: string;
browser: string;
browser_version: string;
os: string;
os_version: string;
device_model?: string;
screen_resolution: string;
viewport_size: string;
color_depth: number;
timezone: string;
language: string;
languages: string[];
raw_user_agent?: string;
}
export interface LocationInfo {
current_url: string;
pathname: string;
search: string;
hash: string;
title: string;
referrer: string;
referrer_domain: string;
initial_referrer: string;
initial_referrer_domain: string;
initial_host?: string;
utm_source?: string;
utm_medium?: string;
utm_campaign?: string;
utm_term?: string;
utm_content?: string;
}
export interface AutomaticProperties extends DeviceInfo, LocationInfo {
}
/**
* Get device information
*/
export declare function getDeviceInfo(): DeviceInfo;
/**
* Get location information
*/
export declare function getLocationInfo(): LocationInfo;
/**
* Get all automatic properties
*/
export declare function getAutomaticProperties(): AutomaticProperties;
/**
* Get initial properties that should be captured once per session
*/
export declare function getInitialProperties(): Record<string, any>;
/**
* Get current page properties (changes with navigation)
*/
export declare function getCurrentPageProperties(): Record<string, any>;
//# sourceMappingURL=property-detector.d.ts.map