Przejdź do głównej zawartości

Function: captureReferralCode()

captureReferralCode(options?): string | null

Capture a referral code from the current URL (or an explicit one) into the referral-code cookie.

Returns the captured code, or the previously stored one when the URL carries no code (so a visitor who navigated away from the landing URL still counts), or null when there is nothing to capture. A code present in the URL always wins over a previously stored one — the most recent referral link decides.

Parameters

options?

CaptureReferralCodeOptions = {}

Returns

string | null