/** * Constants * * Following PostHog's pattern for constant definitions. * These are used throughout the SDK for: * - Storage keys * - Property names * - Event names * - Configuration defaults */ /** SDK version - automatically synced from package.json */ export declare const SDK_VERSION: string; /** @deprecated Use DISTINCT_ID instead */ export declare const PEOPLE_DISTINCT_ID_KEY = "$people_distinct_id"; /** Current distinct_id */ export declare const DISTINCT_ID = "distinct_id"; /** Alias ID for aliasing operations */ export declare const ALIAS_ID_KEY = "__alias"; /** Event timers storage key */ export declare const EVENT_TIMERS_KEY = "__timers"; /** Session ID storage key */ export declare const SESSION_ID = "$sesid"; /** Session storage key (for session manager) */ export declare const STORAGE_KEY = "__vt_session"; /** sessionStorage key — last meaningful capture time (ms since epoch) */ export declare const SESSION_LAST_ACTIVITY_KEY = "__vt_session_last_activity"; /** Window ID storage key */ export declare const WINDOW_ID = "$windowid"; /** Window ID key (for session storage) */ export declare const WINDOW_ID_KEY = "__vt_window_id"; /** Primary window exists key (for tab duplication detection) */ export declare const PRIMARY_WINDOW_EXISTS_KEY = "__vt_primary_window"; /** User state (anonymous/identified) */ export declare const USER_STATE = "$user_state"; /** User state storage key */ export declare const USER_STATE_KEY = "__vt_user_state"; /** Device ID storage key */ export declare const DEVICE_ID = "$device_id"; /** Device ID key (for storage) */ export declare const DEVICE_ID_KEY = "__vt_device_id"; /** Anonymous ID storage key */ export declare const ANONYMOUS_ID = "$anonymous_id"; /** Anonymous ID key (for storage) */ export declare const ANONYMOUS_ID_KEY = "__vt_anonymous_id"; /** Remote config cache key prefix (localStorage: `${REMOTE_CONFIG_KEY}_${token}`) */ export declare const REMOTE_CONFIG_KEY = "__vt_remote_config"; /** Distinct ID key (for storage) */ export declare const DISTINCT_ID_KEY = "__vt_distinct_id"; /** User properties storage key */ export declare const USER_PROPERTIES_KEY = "__vt_user_properties"; /** * Persistence methods object * Following PostHog's approach for storage/persistence configuration */ export declare const PERSISTENCE_METHODS: { cookie: "cookie"; localStorage: "localStorage"; localStoragePlusCookie: "localStorage+cookie"; sessionStorage: "sessionStorage"; memory: "memory"; }; /** Enable person processing flag */ export declare const ENABLE_PERSON_PROCESSING = "$epp"; /** Initial person info (referrer, URL, UTM params) */ export declare const INITIAL_PERSON_INFO = "$initial_person_info"; /** @deprecated Use INITIAL_PERSON_INFO */ export declare const INITIAL_CAMPAIGN_PARAMS = "$initial_campaign_params"; /** @deprecated Use INITIAL_PERSON_INFO */ export declare const INITIAL_REFERRER_INFO = "$initial_referrer_info"; /** Stored person properties for feature flags */ export declare const STORED_PERSON_PROPERTIES_KEY = "$stored_person_properties"; /** Stored group properties for feature flags */ export declare const STORED_GROUP_PROPERTIES_KEY = "$stored_group_properties"; export declare const AUTOCAPTURE_DISABLED_SERVER_SIDE = "$autocapture_disabled_server_side"; export declare const WEB_VITALS_ENABLED_SERVER_SIDE = "$web_vitals_enabled_server_side"; export declare const SESSION_RECORDING_ENABLED_SERVER_SIDE = "$session_recording_enabled_server_side"; /** Pageview event */ export declare const EVENT_PAGEVIEW = "$pageview"; /** Pageleave event */ export declare const EVENT_PAGELEAVE = "$pageleave"; /** Identify event */ export declare const EVENT_IDENTIFY = "$identify"; /** Alias event */ export declare const EVENT_ALIAS = "$alias"; /** Set person properties event */ export declare const EVENT_SET = "$set"; /** Performance event */ export declare const EVENT_PERFORMANCE = "$performance_event"; /** Autocapture event */ export declare const EVENT_AUTOCAPTURE = "$autocapture"; /** Scroll depth milestone event (autocapture) */ export declare const EVENT_SCROLL_DEPTH = "$scroll_depth"; /** Snapshot event (session recording) */ export declare const EVENT_SNAPSHOT = "$snapshot"; /** Snapshot batch items event */ export declare const EVENT_SNAPSHOT_ITEMS = "$snapshot_items"; /** Rate limit warning event */ export declare const EVENT_RATE_LIMIT_WARNING = "$$client_ingestion_warning"; /** Process person profile flag */ export declare const PROP_PROCESS_PERSON_PROFILE = "$process_person_profile"; /** Is identified flag */ export declare const PROP_IS_IDENTIFIED = "$is_identified"; /** Session ID property */ export declare const PROP_SESSION_ID = "$session_id"; /** Window ID property */ export declare const PROP_WINDOW_ID = "$window_id"; /** Current URL */ export declare const PROP_CURRENT_URL = "$current_url"; /** Hostname */ export declare const PROP_HOST = "$host"; /** Pathname */ export declare const PROP_PATHNAME = "$pathname"; /** Seconds on the page being left ($pageleave) */ export declare const PROP_PREV_PAGEVIEW_DURATION = "$prev_pageview_duration"; /** Pathname of the page being left */ export declare const PROP_PREV_PAGEVIEW_PATHNAME = "$prev_pageview_pathname"; /** URL of the page being left */ export declare const PROP_PREV_PAGEVIEW_URL = "$prev_pageview_url"; /** Scroll depth milestone threshold (0–100) */ export declare const PROP_SCROLL_DEPTH_PCT = "$scroll_depth_pct"; /** Max scroll depth % at time of milestone event */ export declare const PROP_SCROLL_DEPTH_MAX_PCT = "$scroll_depth_max_pct"; /** Max scroll depth % on the page being left ($pageleave) */ export declare const PROP_PREV_PAGEVIEW_SCROLL_DEPTH_PCT = "$prev_pageview_scroll_depth_pct"; /** Referrer URL */ export declare const PROP_REFERRER = "$referrer"; /** Referring domain */ export declare const PROP_REFERRING_DOMAIN = "$referring_domain"; /** Browser */ export declare const PROP_BROWSER = "$browser"; /** Browser version */ export declare const PROP_BROWSER_VERSION = "$browser_version"; /** Operating system */ export declare const PROP_OS = "$os"; /** OS version */ export declare const PROP_OS_VERSION = "$os_version"; /** Device type */ export declare const PROP_DEVICE_TYPE = "$device_type"; /** Screen height */ export declare const PROP_SCREEN_HEIGHT = "$screen_height"; /** Screen width */ export declare const PROP_SCREEN_WIDTH = "$screen_width"; /** Viewport height */ export declare const PROP_VIEWPORT_HEIGHT = "$viewport_height"; /** Viewport width */ export declare const PROP_VIEWPORT_WIDTH = "$viewport_width"; /** Library name */ export declare const PROP_LIB = "$lib"; /** Library version */ export declare const PROP_LIB_VERSION = "$lib_version"; export declare const PROP_GEOIP_COUNTRY_CODE = "$geoip_country_code"; export declare const PROP_GEOIP_COUNTRY_NAME = "$geoip_country_name"; export declare const PROP_GEOIP_CITY_NAME = "$geoip_city_name"; export declare const PROP_GEOIP_REGION_NAME = "$geoip_region_name"; export declare const PROP_GEOIP_CONTINENT_CODE = "$geoip_continent_code"; export declare const PROP_GEOIP_TIMEZONE = "$geoip_timezone"; export declare const PROP_GEOIP_LATITUDE = "$geoip_latitude"; export declare const PROP_GEOIP_LONGITUDE = "$geoip_longitude"; /** Initial GeoIP properties (set once) */ export declare const PROP_INITIAL_GEOIP_PREFIX = "$initial_geoip_"; export declare const UTM_PARAMS: readonly ["utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term", "gclid", "gad_source", "gbraid", "wbraid", "fbclid", "msclkid", "twclid", "li_fat_id", "mc_cid", "igshid", "ttclid"]; export type UTMParam = (typeof UTM_PARAMS)[number]; export declare const PERSISTENCE_RESERVED_PROPERTIES: string[]; /** * Person profiles configuration mode * - 'always': Always create person profiles (default) * - 'identified_only': Only create profiles when user is identified * - 'never': Never create person profiles (events only) */ export type PersonProfilesMode = "always" | "identified_only" | "never"; /** Default API host */ export declare const DEFAULT_API_HOST = "https://api.vtilt.io"; /** Default flush interval (ms) */ export declare const DEFAULT_FLUSH_INTERVAL_MS = 5000; /** Default batch size */ export declare const DEFAULT_BATCH_SIZE = 10; /** Session timeout (30 minutes in ms) */ export declare const SESSION_TIMEOUT_MS: number; /** Session ID change threshold (ms) */ export declare const SESSION_CHANGE_THRESHOLD_MS: number; /** Maximum event properties size (bytes) */ export declare const MAX_PROPERTIES_SIZE = 65535; /** Maximum property value length */ export declare const MAX_PROPERTY_VALUE_LENGTH = 8192; /** Timezone to country code mapping */ export declare const TIMEZONES: Record;