Limitation tracking the "referral source" with embedded bookings
Embedding the Cliniko booking portal comes with some limitations. It's possible to track visitor sessions and report direct conversions, however, it's difficult to keep the "source" of each session. Without the " referral source", it will be challenging to report if the source of the booking was an ad click, social media referral, search engine, etc.
If tracking the referral source isn't essential, continue to the "What is Google Analytics 4" section.
If tracking the source is essential, it's worth considering to use the Cliniko hosted booking portal instead of embedding the booking portal. A suggested workaround and context on the limitations can be found below:
iframe limitations 😩
Due to limitations with iframes, the referral data (source) doesn't get passed between the website (parent) to the (child) iframe. Google Analytics uses a function known as Cross-Domain Tracking to observe activity across multiple domains. Unfortunately, iframes don't support Cross-Domain Tracking. This will result in bookings reporting as "Direct" or from the parent website, instead of the original source.
Cliniko prioritises security 🔒
Whilst there are many workarounds available on the web which involve adding custom code to the embedded iframe. For patient security, Cliniko prevents any external/third-party code from running inside the booking pages. This means no custom code can be manually added and the "Custom HTML" tag in Google Tag Manager is blacklisted.
Limited workarounds 🔧
The workaround can be found here.
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/conversions.
The Google Analytics: GA4 Configuration 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:
Configuring 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 the "Google Analytics: GA4 Configuration" Tag from the list of tags:
Name the variable as desired and enter your Measurement ID, copied from Google Analytics. Leave other settings as default.
Note*☝️ Recent Chrome update requires new parameters:
Under the "Fields to Set" section, add a“cookie_flags” field with the value “samesite=none;secure”
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.
Keen to report Goals/Conversions in Google Analytics? Checkout 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 🤗