Przejdź do głównej zawartości

Variable: REFERRAL_COOKIE_NAME

const REFERRAL_COOKIE_NAME: "referral-code" = 'referral-code'

Referral cookie configuration — platform contract.

When a visitor lands on the storefront through a referral link (https://shop.example/register?ref=REF-AB12CD34), the code must survive navigation until the visitor actually signs up — possibly minutes or days later. The SDK persists it in a readable first-party cookie and the signup form passes it to customerSignup(input: { referralCode }).

Used by:

  • captureReferralCode / useReferralCapture (client-side capture on landing)
  • readReferralCodeCookie (client + server readers at signup time)