import { StandardEvents, UserProvidedData as UserProvidedData$1 } from './gtag.cjs'; type AllowedPropertyValues = string | number | boolean | null; type EventName = Lowercase | 'CLS' | 'FCP' | 'INP' | 'LCP' | 'TTFB'; type TrackName = T extends keyof StandardEvents ? T : EventName; type TrackProperties = T extends keyof StandardEvents ? StandardEvents[T] : Record, AllowedPropertyValues>; type Platform = 'ios' | 'android' | 'web' | 'macos' | 'windows' | 'linux' | 'unknown'; type Environment = 'development' | 'production'; interface UserData { userId: string; email?: string; firstName?: string; lastName?: string; phone?: string; dateOfBirth?: string; gender?: string; city?: string; state?: string; postal?: string; country?: string; } interface UserProvidedData extends UserProvidedData$1 { user_id?: string; ip_address?: string; user_agent?: string; gender?: 'female' | 'male'; birthday?: { year: number; month: number; day: number; }; fb_login_id?: string; fb_page_id?: string; } type ThirdPartyTracker = (name: TrackName, properties?: TrackProperties, event_id?: string) => void; interface PlatformInfo { os?: string; os_name?: string; os_version?: string; browser?: string; browser_name?: string; browser_version?: string; /** @deprecated */ platform: Platform; } interface DeviceInfo { device?: string; device_id?: string; device_type?: string; device_vendor?: string; device_model_id?: string; device_pixel_ratio?: number; screen_width?: number; screen_height?: number; screen_resolution?: `${number}x${number}`; } interface AppInfo { /** iOS: IDFA, Android: Android Advertising ID */ advertising_id?: string; install_referrer?: string; } interface EnvironmentInfo { release?: string; language?: string; time_zone?: string; /** @deprecated */ environment: Environment; } interface SourceInfo { source_url?: string; source?: 'app' | 'web' | 'offline'; } interface AdvertisingInfo { /** * Meta pixel fields * ref: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters#fbc * Stored in the _fbc/_fbp browser cookie under your domain * ref: https://www.facebook.com/business/help/2360940870872492?checkpoint_src=any */ fbc?: string; fbp?: string; fbclid?: string; ad_id?: string; ad_name?: string; adset_id?: string; adset_name?: string; campaign_id?: string; campaign_name?: string; placement?: string; site_source_name?: string; /** Google Analytics fields */ gclid?: string; gclsrc?: string; gad_source?: string; gad_campaignid?: string; /** Reddit Ads fields */ rdt_cid?: string; rdt_uuid?: string; /** LinkedIn Ads fields: get click id from url params or first-party cookie */ li_fat_id?: string; dclid?: string; ko_click_id?: string; msclkid?: string; sccid?: string; ttclid?: string; twclid?: string; wbraid?: string; yclid?: string; } interface UTMParams { utm_source?: string; utm_medium?: string; utm_campaign?: string; utm_term?: string; utm_content?: string; utm_id?: string; utm_source_platform?: string; utm_creative_format?: string; utm_marketing_tactic?: string; } interface TrackTags extends PlatformInfo, DeviceInfo, AppInfo, EnvironmentInfo, SourceInfo, AdvertisingInfo, UTMParams { idempotency_key?: string; [key: string]: string | number | boolean | null | undefined; } interface TrackEvent { id: string; name: TrackName; tags: TrackTags; visitor_id: string; session_id: string; platform: Platform; environment: Environment; properties?: TrackProperties; created_at: string; } type TrackEventResponse = { /** track event id: Meta Pixel will use event_id and event_name for deduplication */ id: string; }[]; export type { AdvertisingInfo, AllowedPropertyValues, AppInfo, DeviceInfo, Environment, EnvironmentInfo, EventName, Platform, PlatformInfo, SourceInfo, ThirdPartyTracker, TrackEvent, TrackEventResponse, TrackName, TrackProperties, TrackTags, UTMParams, UserData, UserProvidedData };