Skip to main content

Track online booking conversions in Google Tag Manager

Send online bookings to Google Tag Manager (GTM) to count booking conversions from your online booking page.

Use this article to send every appointment booked on your online booking page to Google Tag Manager (GTM), so you can count booking conversions and see how your marketing campaigns perform. It's for practice managers and clinic owners who look after the clinic's website and marketing. You set up GTM conversion tracking once, for the full online booking page or for the booking widget embedded on your website.


What is GTM conversion tracking for online booking?

Google Tag Manager (GTM) is Google's tool for managing tracking tags on a website and passing data to tools such as Google Analytics. With GTM conversion tracking, Digitail sends a conversion event to your GTM container each time a Pet Parent books an appointment on your online booking page (also called the public calendar).

You can then use that event in GTM to measure how many online bookings your website and campaigns bring in. Digitail sends only this booking event, after the booking is made, and no events for the earlier booking steps.
​

GTM conversion tracking works for both ways of offering online booking: the full online booking page, and the booking widget embedded on your website with the Embed Code. To see which campaign each booking came from inside Digitail, use campaign links instead. See Track the Appointment Source.


How to set up GTM conversion tracking

Before you set up GTM conversion tracking

  • A GTM account and container: If you don't have one yet, follow this step-by-step guide for setting up GTM and enabling cross-domain tracking. The guide is general, not specific to Digitail: it covers creating a GTM account, installing and verifying GTM, creating your first tag, and enabling cross-domain tracking in Google Analytics 4 (GA4).

  • Access to Administration settings in Digitail: You need it to open the Clinic Account page.

  • Know which online booking setup you use: The full online booking page or the embedded booking widget. Each one is set up differently in GTM, as described below.

There are two ways Pet Parents reach your online booking:

  • Full online booking page: The Pet Parent clicks a button on your website, such as "Book now", and goes to your online booking page, for example https://vet.digitail.io/clinics/your-clinic-name.

  • Embedded booking widget: The Pet Parent books in the booking widget on your own website, as in the example below.

Set up GTM conversion tracking for the full online booking page

In Digitail:

  1. Go to Administration → Clinic Profile → Clinic Account.

  2. In Google Tag Manager ID, enter your GTM container ID.

  3. Click Save. Your online booking page now loads your GTM container.

In GTM: Create the conversion tag for the digitail.appointmentCreated event, as shown in the video below.

Set up GTM conversion tracking for the booking widget on your website

The booking widget sends its booking events to the GTM container installed on your own website, so your website needs its own GTM installed.

On your website and in GTM:

  1. Check which embed your website uses. The current Embed Code, copied from Administration → Clinic Profile → Clinic Account, is a script tag with a placeholder box. An older embed is a plain iframe of the booking page added to your website by hand.

  2. If your website uses the current Embed Code, you don't need any extra code. The Embed Code script posts each booking event to your website and pushes it into your website's GTM data layer automatically.

  3. If your GTM container has a custom HTML tag with the HTML code for Google Tag Manager from the GitHub Gist, and your website uses the current Embed Code, delete that tag in GTM and publish the container. The Gist tag does the same job as the Embed Code script, so with both in place every booking reaches your website's GTM twice.

  4. If your website still uses the older iframe embed, the iframe on its own doesn't pass booking events to your website. We recommend replacing it with the current Embed Code (see Enable Online Bookings from your Website). Until you switch, add the HTML code for Google Tag Manager from the GitHub Gist as a custom HTML tag in GTM, as shown at 1:00 to 1:10 of the video below.

  5. In GTM, create the conversion tag for the digitail.appointmentCreated event, as shown in the video below.

Important: Two setups can count each online booking twice. First, if your website uses the current Embed Code, remove the GitHub Gist tag from Google Tag Manager (GTM): with both in place, your website's GTM receives every online booking twice. Second, if you entered your Google Tag Manager ID in Digitail and your website runs the same GTM container, each booking from the embedded booking widget reaches the container in both places, so a conversion tag on that event can count it twice, depending on your GTM setup.

Note: The video shows adding the GitHub Gist code, which you only need for the older iframe embed.


How to use GTM conversion tracking day to day

Each time a Pet Parent books on your online booking page, Digitail sends the digitail.appointmentCreated event to GTM (see 1:50 of the booking widget video). Digitail sends one event per appointment, so a booking for several pets sends one conversion per pet.

You can configure GTM to send these event parameters with your conversion event (see 3:20 of the booking widget video):

Parameter

What it contains

service

The Visit Type that was booked

staff

The name of the staff member the appointment is booked with

datetime_start

The appointment's start date and time

datetime_end

The appointment's end date and time

duration_in_minutes

The length of the appointment in minutes

client_type

Whether the client is new or returning


Things to know about GTM conversion tracking

  • One conversion per pet: A multi-pet booking creates one appointment per pet, so GTM counts one conversion for each pet.

  • Duplicate conversions from the GitHub Gist: With the current Embed Code, the GitHub Gist tag is no longer needed. Keeping it in GTM sends every booking to your website's GTM twice.

  • Duplicate conversions from the same container in two places: If your Google Tag Manager ID is entered in Digitail and your website runs the same container, a booking in the embedded booking widget arrives in both places. Depending on your GTM setup, a conversion tag on that event can count it twice.

  • Only one event: Digitail sends digitail.appointmentCreated after a booking and no other events.

  • Cookie consent on the online booking page: Cookie consent on the online booking page isn't on for every clinic yet. Where it's on, the online booking page shows a cookie banner ("Cookies on this page") with Accept all and Only necessary. If the Pet Parent chooses Only necessary, Google consent for analytics and ads storage is set to denied. GTM still loads and the booking event is still sent, but whether your tags fire depends on your consent settings in GTM, so GTM can count fewer conversions than the online bookings you see in Digitail. The banner never shows in the booking widget embedded on your website.

  • GTM setup is on your side: Digitail sends the booking events. Creating the GTM container, tags and triggers is done in your own GTM account, and the setup guide linked above is a general Google guide.


Frequently Asked Questions (FAQs)

Why does Google Tag Manager count each online booking twice?

There are two common causes. If your website uses the current Embed Code and your GTM container still has the custom HTML tag from the GitHub Gist, both pass the same booking event to GTM: delete the Gist tag and publish the container. If your Google Tag Manager ID is entered in Digitail and your website runs the same container, a booking in the embedded booking widget reaches the container in both places, and a conversion tag on that event can count it twice, depending on your GTM setup.

Do I still need the GitHub Gist code for Google Tag Manager?

You only need the GitHub Gist code if your website still uses the older iframe embed of the online booking page. The older iframe still works but doesn't pass booking events on its own, so we recommend switching to the current Embed Code, which already passes Digitail's booking events to your website's GTM.

Why does Google Tag Manager show more conversions than online booking requests?

Digitail sends one conversion event per appointment, so a booking for three pets counts as three conversions in GTM. If the number is exactly double, check that you removed the GitHub Gist tag and that the same GTM container isn't counting the event both in Digitail and on your website.

Why does Google Tag Manager show fewer conversions than the online bookings in Digitail?

Where cookie consent is on for the online booking page, a Pet Parent who chooses Only necessary denies Google consent for analytics and ads storage. The booking event is still sent, but your tags may not fire, depending on your consent settings in GTM. Cookie consent isn't on for every clinic yet, and the banner never shows in the embedded booking widget.

Where do I enter my Google Tag Manager ID in Digitail?

Enter your GTM container ID in Google Tag Manager ID on Administration → Clinic Profile → Clinic Account, then click Save.

What is the name of the Digitail conversion event in Google Tag Manager?

The Digitail conversion event for an online booking is digitail.appointmentCreated. It carries the service, staff, datetime_start, datetime_end, duration_in_minutes and client_type parameters.

Did this answer your question?