Track events
Track AppointmentRequest
Fire AppointmentRequest when a visitor submits a booking form — clinics, salons, consultants, and every appointment-driven business where the booking is the conversion.
Quick start
One call in your booking form’s submit handler, anywhere after pb.js is loaded — this alone is a working AppointmentRequest event:
adsping('track', 'AppointmentRequest', {
content_name: 'Consultation booking'
});Every extra field you add raises your match quality — the full payload below passes the booker’s contact details.
Full example
Pick the tab for your stack — they all send the same event.
<script>
document.querySelector('#booking-form')
.addEventListener('submit', function () {
adsping('track', 'AppointmentRequest', {
content_name: 'Consultation booking',
value: 0,
currency: 'USD',
email: '[email protected]',
phone: '+1 415 555 1234',
firstName: 'Jane',
lastName: 'Doe',
city: 'San Francisco',
state: 'CA',
zipCode: '94107',
country: 'US',
externalId: 'crm-12345'
});
});
</script>- HTML — replace
#booking-formwith your form’s id and place the snippet anywhere after the AdsPing script tag. - React / Next.js — call
window.adspinginside your form’sonSubmit, before your own submit logic runs. - Google Tag Manager — paste the HTML snippet into a Custom HTML tag, triggered on your booking form submit.
- Using Calendly or another embedded scheduler? Fire the event on the scheduler’s confirmation callback or thank-you redirect instead of a form submit.
Parameters
| Field | Type | Description |
|---|---|---|
content_namerecommended | string | What is being booked, plain text.Consultation booking |
value | number | Appointment value. Use 0 if unknown.0 |
currency | string | ISO-4217 code.USD |
| Field | Type | Description |
|---|---|---|
emailrecommended | string | Email address, any case. The strongest match signal. |
phonerecommended | string | Any format — AdsPing normalizes it to E.164 by country.+1 415 555 1234 |
firstName | string | Given name, plain text.Jane |
lastName | string | Family name, plain text.Doe |
city | string | City name, plain text.San Francisco |
state | string | State / region code.CA |
zipCode | string | Postal / ZIP code.94107 |
country | string | ISO-3166 alpha-2 code.US |
dateOfBirth | string | YYYY-MM-DD.1990-01-15 |
gender | string | 'f' or 'm'.f |
externalId | string | Your own customer / user id, from your CRM or auth session.crm-12345 |
| Field | Type | Description |
|---|---|---|
fbp / fbc | string | Meta browser cookies — read by pb.js, fbc even built from ?fbclid= in the URL. |
client_ip_address | string | Visitor IP, captured on AdsPing's server. |
client_user_agent | string | Visitor browser, captured on AdsPing's server. |
external_id | string | Anonymous visitor id pb.js sets on first visit (your externalId is sent in addition). |
About Event Match Quality (EMQ)
Meta scores each event 0–10 on how well it can match the event to a person. Every field you send adds signal. On top of what you pass, AdsPing attaches the things it can read server-side — so you never paste these:
fbp+fbc— Meta browser cookies, read by pb.js (it even buildsfbcfrom?fbclid=in the URL).client_ip_address+client_user_agent— the visitor’s IP and browser, captured on AdsPing’s server. Meta requires these for website events; they’re sent in plaintext (not hashed).external_id— an anonymous visitor id pb.js sets on first visit.
Every personal field (email, phone, name, address) is SHA-256 hashed before it leaves AdsPing — Meta only ever receives the hash. The more real fields your payload carries, the closer you get to EMQ 10/10.
Test it
- Submit your booking form with test data.
- Open your pixel’s Report → Recent events in AdsPing.
- An AppointmentRequest row appears within ~10 seconds with a green Success badge.
✓ AppointmentRequest is live.
Every booking is now a conversion signal in your connected destinations.