Skip to main content
All CollectionsLet your patients book onlineMarketing & tracking
Connect Cliniko online bookings with Google Analytics 4 (hosted)
Connect Cliniko online bookings with Google Analytics 4 (hosted)

Connect online bookings with Google Analytics 4 using Google Tag Manager

Dara avatar
Written by Dara
Updated over a week ago

What is Google Analytics 4?

Google Analytics 4 is the latest version of Google Analytics, a product built by Google. The platform helps with reporting on website visitors and tracking successful bookings, or conversions.

The Google Tag connects your Google Analytics measurement ID with Cliniko bookings. The tag is deployed through the GTM integration.

If you don't already have a Google Analytics 4 account, you can get started here: https://analytics.google.com

If you're keen to learn more about Google Analytics fundamentals, checkout this self-paced training course offered by Google:


Checklist

  • A Google Analytics 4 account;

  • A Google Tag Manager (GTM) account;

  • GTM container ID added to your Cliniko account.


Google Analytics: GA4 Configuration

Login to Google Analytics 4, open the "Admin" panel:

Property > Data Streams and copy the "Measurement ID":

Login to your Google Tag Manager account and select "New Tag" from your Tag Manager Workspace:

Give your tag a title (Top left) and click "Tag Configuration":

Choose "Google Tag" from the list of tags:

Name the variable as desired and enter your Measurement ID in the "Tag ID" field. You can copy your measurement ID from Google Analytics. Leave other parameters as default.

Save the tag.

Tracking the referral source

If you wish to track the referral source, we need to ensure cross domain tracking is working. This can vary depending on how your website is configured. Here are some tips to help:

To help with cross domain tracking, we can add some extra parameters in the "Configuration settings" section:

Some context around the extra parameters:

"cookie_flags" set to "samesite=none;secure"

"allowLinker" set to "true"

  • This allows domains to pass the Client ID, where the tracking data is stored.

It's recommended to follow Google's support guides on configuring Cross Domain Tracking in Google Analytics: https://support.google.com/analytics/answer/10071811?hl=en

"send_page_view" set to "true"

  • This is a default setting added by Google to send page views. Leave set to "True".


Setting up the Tag Trigger

Once the tag has been configured with Google Analytics, you can set it fire on every page. Start by clicking anywhere in the "Triggering" field:

If a new trigger is needed, click the ✚ sign in the top-right, then anywhere in the "Trigger configuration" page:

Select "Page View" as the type of trigger:

Give your tag a title (Top-left) and leave "All Page Views" as default. Finish by clicking "Save" in the top-right:

Finish the configuration by hitting "Save" in the top-right. Don't forget to Publish your workspace changes in GTM.

Use the "Tag Assistant" tool to preview if tags are firing. This guide will help.


Testing "Realtime" activity in Google Analytics 4

Let's confirm data is flowing through to Google Analytics. Open the Realtime tab in Google Analytics in a separate browser window.

Reports > Realtime

When viewing the Realtime tab, open Cliniko bookings in another window and see if the active user count changes:

Keen to report Goals/Conversions in Google Analytics 4? Check out this guide.


If you're having issues with the GTM integration, please check our "Troubleshooting Tips for Google Tag Manager" guide or reach out to the Cliniko support team. Cliniko offers limited support for issues with the GTM integration and we will do our best to assist. πŸ€—

Did this answer your question?