All Collections
Online Scheduling
Using Online Scheduling
How to setup Event tracking using Google Tag Manager
How to setup Event tracking using Google Tag Manager
Radhika Khadria avatar
Written by Radhika Khadria
Updated over a week ago

Completed appointment bookings can be tracked as custom events in Google Analytics. In order to set up event tracking follow the setup below -

Using Google Tag Manager (GTM)
Pre-requisites :
1. Google Tag Manager Account: Make sure you have a Google Tag Manager account and that you have added the GTM container code to your website.
2. Have a GA4 property setup for the website
3. GA4 Configuration Tag: Make sure you have a Google Analytics 4 configuration tag set up in your GTM container. If you haven't done this yet, create one by going to "Tags" > "New" > "Tag Configuration" > "Google Analytics: GA4 Configuration" and then enter your GA4 measurement ID.

Creating the Data Layer Variable in GTM

If you are an entity without any other practice identifier besides the practice name, you can simply skip the creation of the custom variable.

  1. Navigate to Variables: In Google Tag Manager, go to the "Variables" section from the sidebar.

  2. New User-Defined Variable: Click on "New" under "User-Defined Variables".

  3. Variable Configuration: Click on "Variable Configuration" and choose "Data Layer Variable".

  4. Data Layer Variable Name: Enter the name of the Data Layer key you want to capture. In this example, it would be "label".

  5. Data Layer Version: Usually, you'll use version 2 unless you have a specific reason to use version 1.

  6. Variable Name in GTM: Give your variable a descriptive name so you can identify it later. For example, "CareCru_appointment_Label".

  7. Save: Click "Save" to create your Data Layer Variable.

Setting Up the Tag


1. Create a New Tag: In Google Tag Manager, go to "Tags" and then click on the "New" button.

2. Choose Tag Configuration: Select "Google Analytics: GA4 Event."

3. Configure Tag:

  • Event Name: Enter an event name like "new_appointment_request".

  • GA4 Configuration Tag: Choose your existing GA4 configuration tag from the drop-down, or enter your GA4 measurement ID.

  • Event Parameters: Since you have multiple pieces of data (Action, Category, Label), set up the following key-value pairs:

Parameter Name

Value

Action

New Appointment Request

Category

CareCru Online Scheduler

Label

Click the Lego icon and select the data layer variable you just created in the previous step/ or enter the Practice Code or Practice name
(If you are an entity without any other practice identifier besides the practice name, you can simply skip the creation of the custom variable and enter the Practice Name used in CareCru)

Setting Up the Trigger

  1. Create a New Trigger: In the "Triggering" section, click to add a new trigger.

  2. Trigger Configuration: Select "Custom Event" as the trigger type.

  3. Event Name: New Appointment Request
    (Checkbox for Use regex matching is disabled)

  4. This Trigger fires on - Select Some Custom Events
    Fire this trigger when an Event occurs and all of these conditions are true -

Event

equals

New Appointment Request

5. Click Save

Final Steps

  1. Preview and Test: Use GTM's Preview mode to test that the event is being populated correctly and that the GA4 tag is firing as expected

  2. Publish: Once you've verified that everything is working, go ahead and publish the changes.

Did this answer your question?