This section shows you how to use Google Tag Manager (GTM) to send Practice by Numbers booking events to Facebook (Meta) Pixel.
This allows you to:
Track appointment bookings as Facebook conversions
Track form fills as leads
Build remarketing audiences from booking activity
Where This Happens
Where you’ll work: Google Tag Manager tagmanager.google.com
What you’ll add: Facebook Pixel tags (Custom HTML)
What you won’t touch: Practice by Numbers code
All tracking code lives in GTM, not in PbN
How It Works
What Practice by Numbers Does Automatically ✅
Sends booking events to GTM’s dataLayer
Events include:
pbn_appointment_bookedpbn_patient_info_enteredpbn_booking_widget_opened
Includes helpful data like visit type and appointment date
What You Configure in GTM ⚙️
Add the Facebook Pixel base code
Create tags that:
Listen for PbN events
Call Facebook’s
fbq()function
GTM sends those events to Facebook
What Facebook Receives 📊
Schedule event → Appointment booked
Lead event → Patient info submitted
ViewContent event → Booking widget opened
Facebook can now:
Track conversions
Optimize ads
Build remarketing audiences
Prerequisites
Before starting, make sure:
✅ You have a Facebook (Meta) Business account
✅ You have created a Facebook Pixel
✅ You have your Pixel ID
Looks like:
123456789012345
Don’t have these yet? See Appendix B: Create a Facebook Pixel at the end of this guide.
Install the Facebook Pixel Base Code in GTM
📍 Important: This is done in Google Tag Manager, not in Practice by Numbers.
The base code loads the Facebook Pixel and tracks page views.
Create the Base Pixel Tag
Go to tagmanager.google.com
Open your GTM container
Click Tags → New
Name the tag:
Facebook Pixel – Base CodeClick Tag Configuration
Select Custom HTML
Paste the Base Code
Paste the code below into the HTML box.
⚠️ Replace YOUR_PIXEL_ID with your actual Facebook Pixel ID
Example: If your Pixel ID is
123456789012345, the line should be:fbq('init', '123456789012345');This code stays in GTM - you're NOT editing PracticeByNumbers code!
<script> !function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window,document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', 'YOUR_PIXEL_ID'); fbq('track', 'PageView'); </script>
Example
Set the Trigger
Scroll to Triggering
Select All Pages
Click Save
✅ Facebook Pixel base code is now installed via GTM.
Track Appointment Bookings (Schedule Event)
This sends Facebook’s Schedule event when an appointment is booked.
Create the Schedule Event Tag
Click New (Tags)
Name:
Facebook Pixel – PBN Schedule EventTag Type: Custom HTML
Paste the Schedule Event Code
<script> fbq('track', 'Schedule', { content_name: {{DLV - visit_type_name}}, value: 100, currency: 'USD' }); </script>
What This Does
Sends a Schedule event to Facebook
Includes the visit type name (from GTM variables)
Optionally sends a value
💡 Optional: Change 100 to your average appointment value. Or remove value and currency entirely
Set the Trigger
Trigger: PBN – Appointment Booked
Click Save
Track Form Submissions (Lead Event)
This sends Facebook’s Lead event when a patient submits their information.
Create the Lead Event Tag
Click New
Name:
Facebook Pixel – PBN Lead EventTag Type: Custom HTML
Paste the Lead Code
<script> fbq('track', 'Lead'); </script>
What This Does
Sends a Lead event to Facebook
Ideal for remarketing users who started booking
Set the Trigger
Trigger: PBN – Patient Info Entered
Click Save
Track Widget Opens (ViewContent Event)
This tracks when users open the booking widget.
Create the ViewContent Tag
Click New
Name:
Facebook Pixel – PBN ViewContent EventTag Type: Custom HTML
Paste the ViewContent Code
<script> fbq('track', 'ViewContent'); </script>
Set the Trigger
Trigger: PBN – Widget Opened
Click Save
Publish Your Changes
Click Submit
Version Name:
Added Facebook Pixel for PBN eventsClick Publish
✅ Facebook Pixel tracking is now live.
Verify Using Facebook Pixel Helper
Install the Facebook Pixel Helper Chrome extension
Search Google for "Facebook Pixel Helper Chrome"
Install it from the Chrome Web Store
Go to your booking widget page
Click the Pixel Helper icon in the Chrome toolbar
You should see your Pixel ID and "PageView" event
Do a test booking
After clicking "Book Appointment", you should see:
✓ Schedule event fired
If you see checkmarks, it's working!
Testing Your Setup
Complete Test Checklist
Do a full test booking and verify each platform receives the conversion:
GTM Preview Mode
In GTM, click "Preview"
Enter your booking widget URL
Complete a test booking
In Tag Assistant, verify:
☑
pbn_appointment_bookedevent appears☑ Your Google Ads tag fires (green checkmark)
☑ Your GA4 tags fire (green checkmarks)
☑ Your Facebook Pixel tags fire (green checkmarks)
Google Ads
Go to Google Ads
Click "Tools & Settings" → "Conversions"
Find your booking conversion action
Click on it
Wait 24-48 hours
You should see conversion counts increase
Google Analytics 4
Go to GA4
Click "Configure" → "DebugView"
Do a test booking
See
pbn_appointment_bookedappear in real-timeClick on it to verify parameters are populated
Facebook Pixel
Open your website with the Facebook Pixel Helper extension
Do a test booking
Click the Pixel Helper icon
Verify "Schedule" event fired
Troubleshooting
Problem: Tag shows "Tag Not Fired" in GTM Preview
Possible Causes
Trigger event name doesn't match
Container not published
Event hasn't fired yet
Solutions
Check trigger event name is exactly:
pbn_appointment_booked(lowercase, underscores)Make sure you clicked "Publish" after creating tags
Complete a full booking to trigger the event
Problem: Google Ads conversions not showing
Possible Causes
Wrong Conversion ID or Label
Takes 24-48 hours to appear
Tag firing before conversion action created
Solutions
Double-check Conversion ID and Label from Google Ads
Wait 48 hours after the first test
Create a conversion action in Google Ads first, then set up GTM
Problem: Events not appearing in dataLayer
Possible Causes
GTM not enabled in PracticeByNumbers
Wrong Container ID
Events not selected
Solutions
Go to PracticeByNumbers → Widget Section → Make sure toggle is ON
Verify Container ID format:
GTM-XXXXXXXMake sure "Appointment Booked" checkbox is checked
Problem: "Configuration Tag not found" in GA4 Event tag
Cause: You don't have a GA4 Configuration tag in GTM yet.
Solution
You need to create a GA4 Configuration tag first
This requires your GA4 Measurement ID (format:
G-XXXXXXXXXX)If you're not sure, contact your marketing agency or see GA4 setup docs
Problem: Facebook Pixel shows "No Pixel Found"
Possible Causes
Base Pixel tag not created
Base Pixel tag has wrong Pixel ID
Container not published
Solutions
Create the Facebook Pixel Base Code tag (Step 5.1)
Verify your Pixel ID is correct (no quotes, just numbers)
Publish your container changes

