Skip to main content

Tracking Online Bookings with Google Analytics, Google Tag Manager, Meta Pixel and HubSpot

How to add your tracking codes to Online Bookings, and what you need to set up in your own analytics tools.

Written by Poppy Molko

Principle can load your analytics and advertising tags on your Online Booking pages, so you can see where your booking requests come from and measure your marketing campaigns.

This article will cover what Principle sends, what you need to set up in your own analytics tools, and where Principle's part stops. If you work with an SEO or marketing agency, send them this article.

For setting up Online Bookings itself, see Online Bookings and Appointment Requests.

Adding Your Tracking Codes

Head to Settings > (Brand) General and find the Track Your Page Views section under Online Bookings.

  • Google Analytics 4 - your GA4 Measurement ID, e.g. G-AB12CD34EF. You can add more than one.

  • Google Tag Manager - your GTM Container ID, e.g. GTM-ABC1234. You can add more than one.

  • Cross-Domain Tracking URLs - your website's domain, e.g. https://www.yourpractice.com.au. You can add more than one.

  • Meta Pixel - your Pixel ID (numbers only), e.g. 1234567890123456.

  • HubSpot - your HubSpot Hub ID (numbers only), e.g. 12345678.

In the Google Analytics, Google Tag Manager and Cross-Domain fields, press Enter after each code so it becomes a chip. Then click Save.

Important: Use Google Analytics 4 or Google Tag Manager for Google Analytics, not both. If your Tag Manager container already fires a GA4 tag, only enter the Tag Manager code. Entering both will count every page view twice.

What Principle Tracks

Page Views

Online Bookings has two pages. Your tags load on both, and each one records a page view:

  • Online booking form - https://app.principle.dental/portal/booking/{your-practice}

  • Booking submitted - https://app.principle.dental/portal/booking/{your-practice}/submitted

The Booking submitted page is only reached after a booking request has been sent successfully, so it can be used as a conversion page.

The Booking Request Event

When a patient successfully submits a booking request, Principle sends an event called submitAppointmentRequest with these details:

  • event_uid - a unique ID for this booking request

  • event_date - when the request was made (YYYY-MM-DD hh:mm:ss)

  • appointment_date - the appointment time requested (YYYY-MM-DD hh:mm:ss)

  • days_from_appointment - days between the request and the requested appointment

  • practitioner_name - the practitioner requested

  • treatment_name - the treatment requested

  • transaction_id - same as event_uid, a unique reference for matching bookings

  • UTM parameters - any utm_* (or other) parameters on the booking link, e.g. utm_source, utm_campaign

Note: Principle does not send a value or currency. Booking requests are not confirmed appointments, so there is no price attached.

No patient personal information (name, email, phone, date of birth) is sent to any analytics tool.

How Each Tool Receives It

  • Google Analytics 4 - page views, plus a submitAppointmentRequest event with all the details above.

  • Google Tag Manager - page views through your container, plus an interaction event with the action submitAppointmentRequest and all the details above.

  • Meta Pixel - PageView, plus a custom submitAppointmentRequest event.

  • HubSpot - page views only. Use the Booking submitted page view to track booking requests.

Setting Up Your Analytics Tools

Principle sends the data. Turning it into a conversion, report or audience is done in your own tools. Here is the minimum for each.

Google Analytics 4

  1. Add your Measurement ID in Principle and click Save.

  2. Make a test booking request (see Testing Your Setup below).

  3. In Google Analytics, go to Admin > Data display > Events. submitAppointmentRequest shows in Realtime within minutes, but can take 24-48 hours to appear in this list.

  4. Click the star next to submitAppointmentRequest to mark it as a key event, so it counts as a conversion.

  5. Optional: to report on treatment_name, practitioner_name and the other details, create custom dimensions for them in Admin > Data display > Custom definitions. Google Analytics does not show these details in reports until you do this.

  6. Optional: to use the conversion in Google Ads, link Google Analytics to Google Ads in Admin > Product links > Google Ads links, then create a Google Ads conversion from the key event.

Google Tag Manager

Principle loads your Tag Manager container. Nothing is reported anywhere until you build tags in your container.

Booking requests arrive in Tag Manager as an event called interaction, with action set to submitAppointmentRequest.

  1. Add your Container ID in Principle and click Save.

  2. In Tag Manager, make sure you have a Google tag that fires on Initialization - All Pages.

  3. Create a variable:

    • Variable type: Data Layer Variable

    • Data Layer Variable Name: action

  4. Create a trigger:

    • Trigger type: Custom Event

    • Event name: interaction

    • This trigger fires on: Some Custom Events, where your action variable equals submitAppointmentRequest

  1. Create a GA4 Event tag (and/or a Google Ads Conversion or Meta tag) that fires on this trigger.

    • Event name: your choice, e.g. submitAppointmentRequest or generate_lead.

    • To pass booking details through, create Data Layer Variables for the ones you need (e.g. treatment_name, practitioner_name, event_uid) and add them as event parameters.

  2. Publish your container. Changes in Tag Manager do nothing until published.

Meta Pixel

  1. Add your Pixel ID in Principle and click Save.

  2. Make a test booking request.

  3. In Events Manager, open Custom conversions and create a custom conversion:

    • Conversion event: submitAppointmentRequest

    • Standard event category: Lead (or your preference)

  4. Use that custom conversion in your ad set optimisation and reporting.

Alternatively, create a custom conversion based on the URL containing /submitted. Give it a neutral name, without treatment or condition words.

Note: Meta restricts some health-related businesses. If Meta classifies your practice as health-related, some booking details may be removed and conversion optimisation may be limited. Check Events Manager for data-sharing restriction notices.

HubSpot

HubSpot receives page views only. To track booking requests in HubSpot, use the Booking submitted page view (URL contains /portal/booking/{your-practice}/submitted) in your HubSpot reports. Depending on your HubSpot subscription, you can also use it in workflows or Visited URL custom events (these need Professional or Enterprise).

Sending Patients to Your Website After Booking

In the Online Bookings section, Booking Success Redirect URL lets you enter a page on your own website, e.g. https://www.yourpractice.com.au/thank-you.

After a successful booking request, the patient sees the success message for 5 seconds and is then sent to that page.

This is useful if you prefer to track conversions on your own thank-you page, using the tags already on your website.

Note: UTM parameters on the booking link are not passed on to your thank-you page. They are still included on the submitAppointmentRequest event.

Important: If you track conversions on your own thank-you page, don't also count submitAppointmentRequest as a conversion, or each booking will be counted twice.

Cross-Domain Tracking

Your website (e.g. yourpractice.com.au) and the Online Booking page (app.principle.dental) are different domains. Without cross-domain tracking, a visitor who clicks "Book Online" on your website will appear in Google Analytics as a new visit referred by your own site, and you lose the original source (e.g. Google Ads).

In Principle: add your website's domain to Cross-Domain Tracking URLs.

On your website: you must also set up cross-domain tracking. Principle can't do this part.

  • Google Analytics 4: in Admin > Data collection and modification > Data streams > (your web stream) > Configure tag settings > Configure your domains, add both your website domain and app.principle.dental. Use the same Measurement ID on your website and in Principle.

  • Google Tag Manager: Principle pushes allowLinker: true and linkerDomains to the data layer. Your Google tag in Tag Manager needs to be set up for cross-domain measurement (or read those values with Data Layer Variables). Using the Google Analytics admin setting above is usually simplest.

What Principle Does Not Do

These are your (or your agency's) responsibility:

  • Cookie consent and privacy banners. Principle does not show a consent banner on the booking pages or manage Consent Mode. If your privacy policy requires consent before tracking, speak to your privacy advisor before adding tracking codes.

  • Building tags, triggers and conversions in Tag Manager, Google Analytics, Meta or HubSpot.

  • Conversion values and currency.

  • Google Ads conversion tags directly. Use a Google Analytics key event import or a Tag Manager tag.

  • Tracking on your own website, including your thank-you page.

  • Backfilling historical data.

Testing Your Setup

  1. Open your booking link with a test UTM, e.g. …/portal/booking/{your-practice}?utm_source=test.

  2. Use:

    • Google Analytics 4: open your booking link through Google Tag Assistant, then watch Admin > Data display > DebugView. Events only show in DebugView in a Tag Assistant session.

    • Google Tag Manager: click Preview, then enter your booking link in the Tag Assistant tab that opens

    • Meta: Test events in Events Manager, or the Meta Ads Data Advisor browser extension (formerly Meta Pixel Helper)

  3. Submit a test booking request.

  4. Check you see page views on both pages and the booking request event.
    ​

  5. Decline the test booking request in Appointment Requests.

Note: Ad blockers and privacy browsers block analytics tags. Test in a clean browser profile.

Troubleshooting

  • No data at all - Check the code is saved and the ID has no typos. For Tag Manager, check the container is published.

  • Page views counted twice - Both Google Analytics and Tag Manager codes are entered, and Tag Manager also fires a GA4 tag. Remove one.

  • submitAppointmentRequest missing in Google Analytics reports - Standard reports can take 24-48 hours. Check Realtime or DebugView. Booking details need custom dimensions.

  • Tag Manager tags don't fire on booking - The trigger must be a Custom Event called interaction, filtered on action equals submitAppointmentRequest. A trigger on the event name submitAppointmentRequest won't fire.

  • All bookings show your website as the source - Cross-domain tracking isn't set up on both sides.

  • Each booking counted twice - You are counting both submitAppointmentRequest and your own thank-you page as conversions. Pick one.

  • HubSpot shows no booking events - Expected. Use the /submitted page view.

If you're still stuck, send us a message via our Support icon found at the top right of every page. Include your booking link, which tool you're using, the ID you entered, and a screenshot from Tag Assistant or Meta Ads Data Advisor.

Did this answer your question?