This section shows you how to use Google Tag Manager (GTM) to send Practice by Numbers booking events into Google Analytics 4 (GA4).
This allows you to analyze the full online booking funnel, not just final conversions.
Where you’ll work: Google Tag Manager tagmanager.google.com
What you’ll create:
Data Layer Variables
Triggers
GA4 Event Tags
What you won’t touch:
Practice by Numbers code (events are already sent automatically)
Why This Matters
Google Ads tells you what converted.
GA4 tells you how users got there.
With GA4, you can:
See where patients drop off in the booking flow
Compare visit types, locations, and providers
Build custom booking dashboards
Attribute bookings to traffic sources
How It Works
What Practice by Numbers Does Automatically ✅
Sends booking events to GTM’s dataLayer
Includes details like:
Appointment date & time
Visit type
Provider
Location
Patient type
What You Configure in GTM ⚙️
Create Data Layer Variables to capture that data
Create triggers for booking events
Create GA4 Event tags to send data to GA4
What GA4 Receives 📊
Custom events (ex:
pbn_appointment_booked)Detailed event parameters
Full visibility into your booking funnel
Prerequisites
Before starting, make sure:
✅ You have a Google Analytics 4 property
✅ You already have a GA4 Configuration tag in GTM
If you don’t have a GA4 Configuration tag, this setup requires GA4 onboarding and is outside the scope of this guide. Contact your marketing agency for assistance.
Create Data Layer Variables
These variables allow GA4 to receive appointment details (date, provider, visit type, etc.).
How to Create a Variable
For each variable below, follow the same steps:
In GTM, click Variables
Scroll to User-Defined Variables
Click New
Rename the variable (see table below)
Click Variable Configuration
Select Data Layer Variable
Enter the Data Layer Variable Name
Click Save
Required Variables to Create
Variable Name (GTM) | Data Layer Variable Name |
DLV – appointment_date | appointment_date |
DLV – appointment_time | appointment_time |
DLV – visit_type_id | visit_type_id |
DLV – visit_type_name | visit_type_name |
DLV – provider_id | provider_id |
DLV – provider_name | provider_name |
DLV – location_id | location_id |
DLV – location_name | location_name |
DLV – patient_type | patient_type |
DLV – practice_slug | practice_slug |
⏱️ This takes about 5 minutes and only needs to be done once.
Create Triggers for GA4 Events
You already created the Appointment Booked trigger earlier. Now create two more.
Trigger 1: Widget Opened
Go to Triggers → New
Name: PBN – Widget Opened
Trigger Type: Custom Event
Event name: pbn_booking_widget_opened
Click Save
Trigger 2: Patient Info Entered
Click New
Name: PBN – Patient Info Entered
Trigger Type: Custom Event
Event name: pbn_patient_info_entered
Click Save
You can add triggers for additional events later using the same pattern.
Create GA4 Event Tag – Appointment Booked
This sends the most important booking event to GA4.
Create the Tag
Go to Tags → New
Name: GA4 Event – PBN Appointment Booked
Tag Type: Google Analytics: GA4 Event
Configure the Tag
Select your existing GA4 Configuration tag
Event Name: pbn_appointment_booked
Add Event Parameters
Click Add Row for each parameter:
Parameter Name | Value |
appointment_date | {{DLV – appointment_date}} |
appointment_time | {{DLV – appointment_time}} |
visit_type_name | {{DLV – visit_type_name}} |
provider_name | {{DLV – provider_name}} |
location_name | {{DLV – location_name}} |
patient_type | {{DLV – patient_type}} |
Attach Trigger
Trigger: PBN – Appointment Booked
Click Save
Create GA4 Event Tags for Other Events
Repeat the same steps above for the following events:
GA4 Event – Widget Opened
Event Name:
pbn_booking_widget_openedParameter:
practice_slug → {{DLV – practice_slug}}
Trigger: PBN – Widget Opened
GA4 Event – Patient Info Entered
Event Name:
pbn_patient_info_enteredParameter:
patient_type → {{DLV – patient_type}}
Trigger: PBN – Patient Info Entered
Publish Your Changes
Click Submit
Version Name: Added PBN events to GA4
Click Publish
✅ GA4 tracking is now live.
Verify Events in GA4
Option 1: DebugView (Real-Time Testing)
Best for: Immediate verification while testing
Go to your Google Analytics 4 property at analytics.google.com
In the left sidebar, click "Admin" (gear icon at bottom)
Under "Data display", click "DebugView"
Open your booking widget in another tab
Complete a test booking
Back in DebugView, you should see events appear in real-time:
pbn_booking_widget_openedpbn_appointment_bookedetc.
Click on any event to see its parameters
Tip: DebugView only shows events from sessions where the GA4 debug mode is active. The GTM Preview mode automatically enables this!
Option 2: Realtime Report (Live Traffic)
Best for: Seeing actual user events as they happen
Go to analytics.google.com
In left sidebar, click "Reports"
Click "Realtime"
Scroll down to "Event count by Event name" card
You should see your events listed:
pbn_appointment_bookedpbn_booking_widget_openedpbn_patient_info_enteredetc.
Click on an event name to see more details
Shows: Events from the last 30 minutes
Option 3: Events Report (Historical Data)
Best for: Analyzing trends and conversions over time
Go to analytics.google.com
In left sidebar, click "Reports"
Click "Engagement"
Click "Events"
You'll see a table with all your events:
Event name
Event count
Total users
Event value (if configured)
Mark Appointment Booked as a Conversion in GA4
GA4 → Admin → Events
Find
pbn_appointment_bookedToggle Mark as conversion ON
Now you can:
Track booking conversion rates
Attribute bookings to channels
Optimize campaigns using GA4 data
Troubleshooting: Events Not Showing
Problem: Events not appearing in any view
Check these:
✅ Did you create the GA4 Event tags in GTM?
Go to GTM → Tags
Look for
GA4 Event - PBN Appointment Booked
✅ Is your GA4 Configuration tag firing?
Use GTM Preview mode
Check "Tags Fired" section
Should see your GA4 Config tag
✅ Are events firing in GTM?
Use GTM Preview mode
Complete a test booking
Check for
pbn_appointment_bookedin "Messages" tab
✅ Is the GA4 Measurement ID correct?
In GTM, check your GA4 Configuration tag
Measurement ID format:
G-XXXXXXXXXXVerify it matches your GA4 property
✅ Has it been 24-48 hours?
DebugView: Instant
Realtime: 30 minute delay
Reports: 24-48 hour delay






