export function getMessageMetadata( metadata?: Record, ): Record { return { pageUrl: `${window.location.origin}${window.location.pathname}`, ...metadata, }; }