import { type ContextData, type utils } from '@farfetch/blackout-analytics'; import parse from 'url-parse'; export type WebContext = ContextData & { web: { window: { location: parse>; navigator: Navigator; screen: Screen; }; document: { title: string; referrer: string; }; } & ProcessedContextWeb; }; export type ProcessedContextWeb = { [utils.ANALYTICS_UNIQUE_VIEW_ID]?: string | null; [utils.ANALYTICS_PREVIOUS_UNIQUE_VIEW_ID]?: string | null; [utils.LAST_FROM_PARAMETER_KEY]?: string | null; [utils.PAGE_LOCATION_REFERRER_KEY]?: string; }; /** * Returns a partial object of web context for the analytics package. * The remaining properties will be added when the this context object gets processed * by analytics, adding the ProcessedContextWeb values. * * @returns Context object for web applications. */ declare const webContext: () => Partial; export default webContext;