UNPKG

@promokit/react

Version:

React components for PromoKit marketing infrastructure

28 lines (27 loc) 778 B
export interface ReferralData { code: string | null; source: string | null; medium: string | null; campaign: string | null; timestamp: number; referrer: string | null; } export interface UseReferralOptions { paramNames?: string[]; persistent?: boolean; trackAnalytics?: boolean; } export declare function useReferral(options?: UseReferralOptions): { referralData: ReferralData | null; isLoaded: boolean; clearReferral: () => void; trackConversion: (email: string, newReferralCode: string) => void; referralCode: string | null; utmSource: string | null; utmMedium: string | null; utmCampaign: string | null; }; declare global { function gtag(...args: any[]): void; function fbq(...args: any[]): void; }