Skip to content
HomePagesHomePages template kit

captureSource

Read attribution from a referrer, a query string, and the current URL.

Read attribution from a referrer, a query string, and the current URL. Exported for testing and for callers assembling a source override by hand.

Import from @homepages/template-kit/browser.

function captureSource(referrer: string, search: string, href: string): Partial<LeadSource>
Name Type Required Description
referrer string required
search string required
href string required

Partial<LeadSource>