What is Google Analytics?
Google Analytics helps with reporting on website visitors and tracking conversions. The Google Analytics: Universal Analytics tag connects your Google Analytics tracking property with Cliniko bookings using the GTM integration. If you don't already have a Google Analytics 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: https://analytics.google.com/analytics/academy/course/6
Before setting up the Universal Analytics tag, you will need:
A Google Analytics account;
A Google Tag Manager (GTM) account;
GTM container ID added to your Cliniko account.
Configuring the Universal Analytics tag
Start by logging into your Google Analytics account and heading over to the "Property Settings" on the "Admin" page:
Copy the "Tracking Id", also known as your Google Analytics Property:
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 the "Google Analytics: Universal Analytics" Tag from the list of tags:
Leave the "Track Type" as the default "Page View" and select "New Variable" under "Google Analytics Settings":
On the next page, name the variable as desired and enter your "Tracking ID" from Google Analytics. Leave the "Cookie Domain" set to "Auto":
Cross-domain tracking is a way for Google Analytics to continue tracking the same visitor session across multiple domains. This avoids creating a new visitor session when a user moves between multiple domains or sub-domains.
For example, a user clicks from Facebook to your website, then clicks a "Book online" button to redirect them to a Cliniko hosted bookings portal. Without cross-domain tracking, a new user session would be triggered when they land on the website and redirect to the Cliniko hosted bookings. Should the user continue to book an appointment, we want the conversion (Goal) in Google Analytics to report the source of the booking as Facebook. Cross-Domain Tracking allows Google Analytics to see the original source. 📊
Note ☝️: Cross-Domain Tracking doesn't work with embedded bookings due to limitations with
<iframe> tags. This will result in conversions in the embedded bookings portal reporting as "Direct" seen as the iframe is detecting the source as the parent website. There are some technical workarounds to get the parent site and child frame to share information but please be warned, it can be incredibly difficult to get working. This article will offer more context and a suggested workaround.
To ensure Cross-Domain Tracking will work when redirecting from your website to a Cliniko hosted bookings portal, some extra parameters are necessary for the Variable set up. Click anywhere in the Variable Configuration section:
Under "Field to Set" -- create a field name called "allowLinker" and set the Value to "true"
Under "Cross-domain tracking" > "Auto Link Domains" copy/paste the following two domains, including the comma:
Save the settings and publish the changes in GTM.
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:
Visitors will now be tracked through your Cliniko bookings. Open the Realtime time in Google Analytics in a separate browser window. When viewing the Realtime tab, open Cliniko bookings in another window and see if the active user count changes:
A Consent prompt is offered to new visitors and needs to be accepted before any tracking can occur:
If the active user session isn't changing, we will need to troubleshoot the tag configuration in GTM.
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!