> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.hoppyapps.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 📘 Configure Meta Pixel for Appointment Bookings

Want to track when customers book appointments through your Meta ads, build retargeting audiences, and optimize your campaigns for actual bookings? The Meta Pixel integration in Hoppy Appointments can do that.

Once connected, Hoppy Appointments sends booking events to Meta in two ways:

* **Browser Pixel** → Tracks events from inside the booking widget  
* **Conversions API** → Sends the same events server-side, so they still count even if the browser is blocked

Both methods share the same event IDs, so Meta can deduplicate them automatically.

This guide walks you through the setup step-by-step.

---

# **⚠️ Before You Begin**

Before setting up Meta Pixel tracking, make sure you have:

* The **Hoppy Appointments** app installed on your Shopify store  
* At least one active service  
* A **Meta Business account**  
* A **Meta Pixel** already created in Meta Events Manager  
* Access to your Pixel ID and a Conversions API access token

💡 If you haven’t created a Meta Pixel yet, set one up in Meta Events Manager first. You’ll need it before continuing.

---

# **🛠️ Step 1 — Open Analytics & Tracking Settings**

In your Shopify admin:

1. Open the **Hoppy Appointments** app  
2. Click **Settings** in the app menu  
3. Click **Analytics & Tracking**

You’ll see cards for the available tracking providers. This guide focuses on the **Meta Pixel & Conversions API** card.

---

# **🛠️ Step 2 — Find Your Meta Pixel ID**

1. Go to **Meta Events Manager**  
2. Select the Pixel you want to use  
3. Copy the **Pixel ID** — it’s a long number, like `123456789012345`

Back in Hoppy Appointments, paste it into the **Pixel ID** field.

---

# **🛠️ Step 3 — Generate a Conversions API Access Token**

The Conversions API sends events directly from Hoppy Appointments’ servers to Meta. This improves tracking reliability because it works even when browser-based tracking is blocked.

To generate the token:

1. In Meta Events Manager, open your Pixel  
2. Go to the **Settings** tab  
3. Scroll down to **Conversions API**  
4. Click **Generate access token**  
5. Copy the token

Back in Hoppy Appointments, paste it into the **Conversions API access token** field.

⚠️ Important:

The access token is a secret. It is stored server-side and never shown to customers or sent to the browser.

---

# **🛠️ Step 4 — Optional Test Event Code**

If you want to test your setup before going live, enter a **Test event code** from Meta Events Manager.

When a test event code is entered, events are routed to Meta’s Test Events tab so you can verify they arrive correctly.

ℹ️ Leave this field empty in production. Test event codes are only for debugging.

---

# **💾 Step 5 — Save**

Click **Save** in the top bar.

Wait for the confirmation message. Once saved, Meta Pixel and Conversions API tracking are active.

ℹ️ There is no separate “Enable Meta Pixel” toggle. The integration becomes active once the Pixel ID and access token are saved.

---

# **📈 What Events Are Tracked**

Once connected, Hoppy Appointments automatically sends the following events to Meta.

## **Purchase**

Fired when a booking is created.

* **Free bookings** → fires immediately after the customer submits the form  
* **Paid bookings** → fires after the customer completes checkout and payment is confirmed  
* Includes booking value, currency, and service details

This is your main conversion event for ad optimization.

---

## **CompleteRegistration**

Fired when you mark a booking’s attendance as **Completed** in the admin.

Use this to track appointments that were actually fulfilled.

---

## **CancelBooking**

Fired when a booking is cancelled — either by you or by the customer.

---

## **RescheduleBooking**

Fired when a booking is moved to a new date or time.

---

## **Lead**

Fired when a customer joins the waitlist for a fully booked slot.

---

# **⚠️ Important Notes & Limitations**

* **The browser Pixel runs inside the booking iframe.** Hoppy Appointments does not inject Meta Pixel scripts directly into your Shopify theme. The Pixel loads when the booking widget opens.

* **Conversions API is server-side.** It sends events from Hoppy Appointments’ servers, so tracking works even when browser scripts are blocked by ad blockers or privacy settings.

* **Events are deduplicated automatically.** The browser Pixel and Conversions API share the same event ID for each booking action, so Meta counts each event only once.

* **Manual bookings are not tracked.** Bookings created by your team in the admin, POS, or manually are excluded from analytics.

* **PII is hashed before sending.** Customer email, phone, and name are SHA-256 hashed before being sent to Meta. Raw values are never shared.

* **Bundle bookings count as one conversion.** A single Purchase event is fired for the parent bundle, not for every individual session inside it.

* **Remove the test event code in production.** If you used a test event code while setting up, clear it before you start running live campaigns.

---

# **🎉 Final Result**

Once configured:

✅ Booking conversions are sent to Meta through both Pixel and Conversions API  
✅ Free and paid bookings trigger the Purchase event correctly  
✅ Lifecycle events like reschedule, cancel, and complete are recorded  
✅ Waitlist signups appear as Lead events  
✅ Events are deduplicated between browser and server  
✅ You can optimize ads and build audiences based on real booking activity

With Meta Pixel connected, your appointment bookings become measurable conversions inside Meta Ads Manager 📊

---