@thrivestack/analytics-browser
Version:
ThriveStack Analytics Platform - Comprehensive web analytics tracking with privacy-first approach
111 lines • 2.83 kB
TypeScript
export interface ThriveStackOptions {
apiKey: string;
apiEndpoint?: string;
trackClicks?: boolean;
trackForms?: boolean;
respectDoNotTrack?: boolean;
enableConsent?: boolean;
batchSize?: number;
batchInterval?: number;
geoIpServiceUrl?: string;
source?: string;
sessionTimeout?: number;
debounceDelay?: number;
defaultConsent?: boolean;
}
export interface LocationInfo {
city?: string | null;
region?: string | null;
country?: string | null;
postal?: string | null;
loc?: string | null;
timezone?: string | null;
}
export interface UTMParameters {
utm_campaign?: string | null;
utm_medium?: string | null;
utm_source?: string | null;
utm_term?: string | null;
utm_content?: string | null;
}
export interface EventContext {
device_id?: string | null;
group_id?: string;
session_id?: string;
source?: string;
}
export interface EventProperties {
page_title?: string;
page_url?: string;
page_path?: string;
page_referrer?: string | null;
language?: string | null;
ip_address?: string | null;
city?: string | null;
region?: string | null;
country?: string | null;
postal?: string | null;
loc?: string | null;
timezone?: string | null;
element_text?: string | null;
element_tag?: string | null;
element_id?: string | null;
element_href?: string | null;
element_aria_label?: string | null;
element_class?: string | null;
element_position_left?: number | null;
element_position_top?: number | null;
viewport_height?: number;
viewport_width?: number;
form_id?: string | null;
form_name?: string | null;
form_action?: string | null;
form_fields?: number;
form_completion?: number;
interaction_time?: number | null;
[key: string]: any;
}
export interface ThriveStackEvent {
event_name: string;
properties: EventProperties;
user_id?: string;
context: EventContext;
timestamp: string;
}
export interface UserData {
user_id: string;
traits: {
user_email?: string;
user_name?: string;
[key: string]: any;
};
timestamp: string;
}
export interface GroupData {
group_id: string;
user_id?: string;
traits: {
group_type?: string;
account_domain?: string;
account_name?: string;
[key: string]: any;
};
timestamp: string;
}
export interface SessionData {
sessionId: string;
startTime: string;
lastActivity: string;
}
export interface ConsentCategories {
functional: boolean;
analytics: boolean;
marketing: boolean;
}
export interface InteractionHistoryItem {
type: string;
details: EventProperties;
timestamp: string;
sequence: number;
}
//# sourceMappingURL=types.d.ts.map