Seamless Reporting for Your Website with Google Analytics

If you use Google Tag Manager with Google Analytics on your website, we recommend this Analytics Help article to configure cross-domain tracking.

Follow these steps to configure seamless reporting between your website and your Cliniko bookings page with Google Analytics cross-domain tracking.

In this article:

What is cross-domain tracking?

Cross-domain tracking with Google Analytics makes it possible for you to measure your visitors' interactions with two different sites -- like your business website and your Cliniko online bookings page -- all in one place.

Why use cross-domain tracking?

If your website visitors click on a link to your Cliniko bookings page to make appointments, or book appointments using Cliniko's embedded online bookings form, you'll want to ensure that Google Analytics can record data like how those visitors arrived to your website, or which pages on your website were visited before booking appointments. 

Without cross-domain tracking, the visitor session breaks when visitors either go to your Cliniko bookings page from your website or make appointments using Cliniko's embedded bookings form. If this happens, your Google Analytics data will show two separate visitors instead of one, causing you to lose valuable data such as source / medium, or user path on your website prior to booking appointments.

In this article, we'll show you how to configure cross-domain tracking so Google Analytics retains valuable data, enabling you to do things like improve your visitors' experience and increase your booked appointments.

What's needed to get started?

  • A Cliniko account with online bookings enabled and Google Analytics configured
  • A Google Analytics account with a property configured for your website
  • Experience editing HTML and coding in JavaScript, or help from an experienced web developer

How to configure cross-domain tracking on your website

To set up cross-domain tracking, you'll need to be comfortable editing HTML and coding in JavaScript, or have help from an experienced web developer.

By default, your Cliniko online bookings page is configured to handle cross-domain tracking, so you will not need to modify any code on your Cliniko bookings page.

To manually configure cross-domain tracking on your website, find and modify the Google Analytics code snippet on every page of the desired property, and modify it to include the following changes highlighted in bold red text:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

 ga('create', 'UA-XX-XXXXXX', 'auto', {'allowLinker': true});
 ga('require', 'linker');
 ga('linker:autoLink', ['YOUR-ACCOUNT.cliniko.com'], true );
 ga('send', 'pageview');
</script>

Remember to replace YOUR-ACCOUNT with your account's subdomain.

Verify cross-domain tracking works

To confirm cross-domain tracking has been set up correctly, Google highly recommend using their Chrome browser extension, Google Tag Assistant Recordings. To get started with Tag Assistant Recordings, follow this Analytics Help article, as well as its related resources.

What's next

If you also use Cliniko's embedded bookings form on your website, we recommend integrating your form with Google Analytics.

Have more questions? Submit a request

Comments

Powered by Zendesk