UNPKG

begrowth-analytics-utils

Version:

Analytics utility functions used by 'analytics' module

25 lines (24 loc) 680 B
/** * @typedef {{ * campaign: string, * referrer?: string, * } & DomainObject & Object.<string, any>} ReferrerObject */ /** * Checks a given url and parses referrer data * @param {String} [referrer] - (optional) referring URL * @param {String} [currentUrl] - (optional) the current url * @return {ReferrerObject} [description] */ export default function parseReferrer(referrer?: string | undefined, currentUrl?: string | undefined): ReferrerObject; export type ReferrerObject = { campaign: string; referrer?: string; } & DomainObject & { [x: string]: any; }; export type DomainObject = { source: string; medium: string; term?: string; };