Marketing attribution with NexHealth online booking

Which campaign an online booking came from: the three link parameters that are stored, how to read them back, and how to count a real visit.

If a practice books through NexHealth online booking, you can tell which campaign a booked appointment came from. Three query parameters on the practice's booking link are stored with the appointment and come back through the API. Nothing else on the link is stored.

What works

The practice's booking link looks like https://app.nexhealth.com/appt/<subdomain>. Add any of these parameters to it:

ParameterComes back asValues
ctbooking_details.campaign_typeAny string. NexHealth's own links use recall, missed_recall, cancelled_recall, continuing_care_recall and manual, so pick names that do not collide with those.
cidbooking_details.campaign_idAny string. Use your campaign id or click id.
cmbooking_details.campaign_mediumemail or sms. Any other value is stored as null.

Example: https://app.nexhealth.com/appt/demo-practice?ct=paid_search&cid=gclid_abc123

Do not put anything that identifies the patient in these values.

Reading it back

  1. Subscribe to appointment_insertion or appointment_created for the practice. See Setting up webhooks.
  2. When the event arrives, call GET /appointments/{id}?subdomain=<subdomain>&include[]=booking_details. On v3.0.0 the webhook payload does not carry booking_details, and neither does the GET /appointments list.
  3. Read booking_details on the appointment:
"booking_details": {
  "booked_via_nexhealth_generated_link": false,
  "campaign_type": "paid_search",
  "campaign_id": "gclid_abc123",
  "campaign_medium": null,
  "booked_via_one_click": false
}
  1. Match campaign_id to the click or campaign in your marketing system.

Counting the conversion

Booked is not attended. Follow the appointment after booking:

  • cancelled: true or patient_missed: true means the visit did not happen.
  • checked_out: true means the visit finished. Where the system does not record a check-out time, checked_out_at is when NexHealth first saw the appointment as checked out.
  • A past appointment that is neither cancelled nor missed is a fair proxy for attended on systems that do not report check-out.

Subscribe to appointment_updated to get these changes as the sync reads them.

What does not work

  • Parameters other than ct, cid and cm are not stored. That includes utm_*.
  • Only appointments booked through NexHealth online booking carry these fields. On appointments booked any other way, booking_details is null.
  • Nothing is stored about the visitor's page, referrer or session. Keep that on your side, keyed by cid.

Did this page help you?
ChangelogMCP serverErrorsdevelopers@nexhealth.com