Track where bookings come from
Record referral identifiers on Site visits and read them from booking responses
Add ref to a Site link to identify who sent a customer:
https://shop.example.com/experiences/surf-camp?ref=external-partner-42The value can identify an external affiliate, partner or any other referrer.
No ambassador account or prior registration is needed. Easol records the
case-sensitive value, up to 50 characters, and returns it as referral_code
on the booking's first_visit and last_visit.
Read the referral from a booking
Retrieve the booking with
GET /bookings/{id}.
Each recorded visit has this shape:
{
"object": "customer_visit",
"id": "visit_7hK2mQ9x",
"occurred_at": "2026-04-15T09:03:12Z",
"landing_page": "https://shop.example.com/experiences/surf-camp",
"referrer_url": "https://partner.example.com/",
"referral_code": "external-partner-42"
}Use first_visit.referral_code to identify the referrer who introduced the
customer, or last_visit.referral_code for their latest captured referral.
Both visits are null when none were recorded, such as a booking created
through the API or dashboard, or a customer who never followed a ref link.
When visits are recorded
The Site captures a visit only when the URL contains a nonblank ref
code. It keeps the first referral for 30 days and replaces the last capture
when another referral arrives. Page views without ref leave both captures
unchanged, regardless of the referring site or elapsed time.
After checkout passes verification, the captured visits are added to each
booking in the order. Allow around an hour for visits to appear; they can take
longer during delays. An initial null does not mean that no referral was
captured. If your integration needs referral attribution, retrieve the booking
again later before treating the referral as absent.
If only one visit was captured, it represents both first and last, with the same visit ID in both fields. Distinct visits are ordered by their capture timestamps. Exact timestamp ties use a stable ID order.
Limits
- Tracking uses Site cookies. Blocking or clearing cookies, or changing browsers or devices, can prevent visits from being recorded.
- The referrer depends on what the browser sends. It may be shortened to the site's origin or omitted.
- Landing and referring URLs exclude all query parameters and fragments. URLs are limited to 500 characters and may be shortened further to fit the signed cookie.