API/Track Click

Track Click

Record a referral click and return a click id.

Record a referral click when a visitor lands with an affiliate code. Call this once per landing session, then store the returned clickId with the browser visitor.

POST /api/v1/affiliate/click
{
  "ref": "AMEN20",
  "visitorId": "visitor_123",
  "landingUrl": "https://amen-colors.com/pricing"
}

The response includes a clickId. Store it in a cookie or session and send it again on signup.

Recommended cookie names:

growth_visitor_id
growth_click_id
growth_ref

If you use public links like /r/AMEN20, Growth records the click and redirects to the partner target URL. If you own the landing page and need more control, call this endpoint directly from your backend.