This article will cover some FAQ's and tips to help troubleshoot common issues with the Google Tag Manager (GTM) integration.

Troubleshooting tools

There are some tools to help troubleshoot GTM issues and double check everything is working as expected. These tools help us see if the tags are firing correctly be it on your website or through the Cliniko hosted bookings portal:

Already have the tools installed? Jump to the FAQ section.


GTM Preview Debug tool

This tool can be used directly from your GTM account. You should see the "Preview" option near the top of your Workspace, here:

Once "Preview" mode is activated, a Debug panel will load on the pages where your GTM container is placed. The Debug tool will show you what tags are firing and what tags aren't:

The above screenshot contains the GTM Debug panel across the bottom of the page. It loads automatically when you access a page with your GTM container ID. The "Summary" section inside the Debug panel indicates what tags are firing. If you click on a tag, you can see more information such as the firing "Triggers".

Note ☝️The Debug panel will load twice if you embed cliniko bookings into your website. One panel is for the website, the other will appear inside the iframe.

This Google Support guide will also help with using the Preview Debug tool: https://support.google.com/tagmanager/answer/6107056?hl=en


Google Tag Assistant

Install the Google Tag Assistant extension in your Chrome browser here: https://chrome.google.com/webstore/detail/tag-assistant-by-google/kejbdjndbnbjgmefkgdddjlbokphdefk?hl=en

The browser extension should appear in the top-right of your Chrome browser and when enabled, will display any GTM tags on the site. You don't need to be logged into your GTM account as this extension talks directly with the active web-page:


Facebook Pixel Helper

The Facebook Pixel Helper extension can be added to your Chrome browser here: https://chrome.google.com/webstore/detail/facebook-pixel-helper/fdgfkebogiimcoedlicjlajpkdmockpc?hl=en

Similar to Google Tag Assistant, the extension will appear in the top-right, looking for any Facebook Pixels on the page:

We support the Custom IMG tag to add a Facebook Pixel to online bookings.

Page Analytics

Page Analytics is primarily a data analysis tool but it's helpful for troubleshooting the Google Analytics tracking in real time:

The Page Analytics Chrome Extension allows you to see how customers interact with your web pages, including what they click and don’t click. Use these insights to optimize your website layout, improve user experience, and increase conversions.

When you view a web page for which you have Google Analytics access, you’ll see:

Google Analytics metrics:

  • Pageviews,

  • Unique Pageviews,

  • Avg time on page,

  • Bounce Rate,

  • Exit %

  • Number of active visitors, in real time

  • In-page click analysis: (where users click)

The extension can found here:

https://chrome.google.com/webstore/detail/page-analytics-by-google/fnbdnhhicmebfgdgglcdacdapkcihcoh


FAQ section

GTM integration:

Google Analytics:

Facebook Pixel:

Embedded iframe:


I can't see any tags on my online bookings pages

Here are 3 common reasons for tags not firing:

1. Unpublished tags in GTM.

On your GTM Workspace, check for and Submit any unpublished "Workspace Changes" here:

2. GTM container ID doesn't match the ID in your Cliniko account.

Your GTM container ID is located on your GTM workspace, here:

It should match the "Google Tag Manager Container ID" in the connected Cliniko account. This field is located under Settings → Online bookings:

3. Cookie Consent is required for GTM.

A Consent prompt is offered to new visitors and needs to be accepted before any tracking can occur:

Your Cookie preferences can be modified on the Cookie Policy page. You can access that page at the bottom of the booking portal, just here:


Google Analytics FAQ:

Not seeing any activity in Google Analytics

There are a few reasons for no activity in Google Analytics. Start by checking if your tags are firing using the troubleshooting tools in this article.

If the troubleshooting tools show the tags are firing and still no activity in Google Analytics, open the Realtime time in Google Analytics in a new browser window. When viewing the Realtime tab, open Cliniko bookings in another window and see if the active user count changes:

If the active user session isn't changing, we will need to troubleshoot the tag configuration in GTM.

Matching properties and tag configuration

Start by logging into your Google Analytics account and heading over to the "Property Settings" on the "Admin" page:

Note the "Tracking Id", also known as your Google Analytics Property:


Login to your Google Tag Manager account and select the "Tags" page your Tag Manager Workspace:

The tag configuration should look like this:

If these parameters are correct, then let's check the property ID under the variables page:

The "Tracking ID" should match the Google Analytics property ID:


Conversions not appearing in Google Analytics

If you're seeing activity in Google Analytics but your Goals are not triggering, there could be an issue with the Goal configuration.

There are two types of Goals that work with Cliniko, depending on where your bookings come from: 1) Embedded iframe on your website. 2) Through the Cliniko hosted booking portal.

The embedded bookings uses an "Event" based trigger for the Goal. The event parameters need to exactly match the Universal Analytics tag configuration in GTM.

The Cliniko hosted bookings uses the "Destination" goal with a URL based trigger "bookings/confirmation".

Troubleshooting the "Destination" based Goal for Cliniko hosted bookings:

Login to your Google Analytics account and navigate to the "Admin" section:

Find the "Goals" option under the "View" section:

Click on the "Destination" Goal:

Open Step 3 "Goal details" and check the Destination is set to "Begins with" and "bookings/confirmation".

Troubleshooting the "Event" based Goal for embedded bookings:

Login to your Google Analytics account and navigate to the "Admin" section:

Find the "Goals" option under the "View" section:

Click on the "Event" Goal:

Open Step 3 "Goal details" and check the Event parameters are matching the Universal Analytics tag in GTM:

Open the tag configuration for the Universal Analytics tag in GTM. Check the following Event parameters are matching:


Direct traffic in Google Analytics

If you're using the embedded bookings and the traffic is being reported as "Direct", then the issue could be with the tracking implementation.

Due to limitations with iframes, the referral data (source) doesn't get passed across from the website (parent) to the iframe. The browser cookie file, where the referral data lives, gets assigned by default to the parent page. Getting this data to consistently pass across to the iframe has been a real challenge, so we've decided to take the conversion tracking outside of the iframe entirely and create a listener event on the parent page.

This is based on the method described in: https://www.impression.co.uk/blog/cross-domain-iframe-tracking-via-google-tag-manager/

The embedded bookings page will use a postMessage to notify the parent page when the booking confirmation page has been reached. Rather than using GTM/GA to track the completed booking from the Cliniko iframe, we can have the parent page listen for this message, push an event to the GTM data layer, and use that event as the trigger for our GA tag in GTM. So rather than Cliniko reporting to GA, what we’re doing is having Cliniko tell the parent page when it should report to GA. This way all reporting is done from the parent domain, eliminating the need for cross domain tracking.

To respond to the message from the Cliniko iframe, include the following Javascript on the page which has the iframe embedded.

window.addEventListener("message", receiveMessage);

function receiveMessage(e) {

if (typeof e.data !== 'string') return;

if (e.data.search('cliniko-bookings-page:confirmed') > -1) {

var dataLayer = window.dataLayer || (window.dataLayer = []);

dataLayer.push({

'event': 'clinikoBookingCompleted'

});

}

}

You can then set up a Universal Analytics tag in GTM which is triggered by this event. Start by creating a new Trigger in GTM, of type “Custom Event”, with the event name “clinikoBookingCompleted”.

Here are the recommended steps to add the listener event. Please double check the configuration is correct and the tag is firing upon booking completion. The GTM Preview tool can be used to test the clinikoBookingCompleted tag.

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

Click the Triggering section here:

Click the ✚ sign in the top-right:

Click "Trigger configuration" and select "Custom Event":

Name the Event and Trigger: clinikoBookingCompleted and hit Save:

Create a new tag “Google Analytics: Universal Analytics” tag, and assign it to the trigger you just created.

  • Set the Track Type to "Event"

  • Set the Category to "complete"

  • Set the Action to "booking"


Testing tags with Preview

Test the Event is firing correctly using the "Preview" tool in GTM. This tool can be used directly from your GTM account. You should see the "Preview" option near the top of your Workspace, here:

Once "Preview" mode is activated, a Debug panel will load on the pages where your GTM container is placed. The Debug tool will show you what tags are firing and what tags aren't. Upon completing a booking in the embedded iframe, the "clinikoBookingCompleted" tag should appear under the "Tags fired" section in the debug panel on your website.


Facebook Pixel FAQ:

No activity in Facebook Business Manager

Is the Facebook Pixel appearing on the bookings pages when using Facebook Pixel Helper? If not, check "Why are my tags not appearing in online bookings?" above.

The first troubleshooting step is to check the tag configuration in GTM. Open the "Tags" area in GTM and select the Custom IMG tag from the list:

The ID in the URL should not contain any curly brackets and should look similar to this: https://www.facebook.com/tr?id=123456789&ev=PageView&dl={{Page URL}}

The above Image URL is a working example.

In your Facebook Business Manager account, head over to Data sources > Test events > Test browser events:

Enter the URL where your Cliniko online bookings is located, click "Open website" and test a booking. You should see the event activity tracker fill up as you complete a booking:


The URL isn't changing to track conversions with embedded bookings

The iframe URL is working in the background and won't appear in the main browser URL bar. Here's a view from the Network panel showing the "bookings/confirmation" page changing in the background:


Duplicate tracking in the embedded bookings

Depending on what your end goal is, duplicate tracking may not always be an issue. Things like conversions will only be tracked once as they have a specific trigger.

You can add an Exception to a tag so it doesn't fire on the page you've embedded the Cliniko bookings iframe.

To get started, login to your GTM account and open the tag you wish to apply the Exception. In the "Triggering" section, select "Add Exception":

Click the ✚ sign in the top-right:

Then anywhere in the "Trigger configuration" area:

Select "Page View" as the type of trigger:

Choose "Some Page Views" and set the parameters to match the following:

  • Page Path;

  • Equals;

  • Page path where iframe is embedded*

Note* 👆 The URL (page path) will depend on the page the iframe has been embedded. In this example, the iframe is embedded on your-website.com/appointments

Once everything has been completed, don't forget to save the Exception and publish your changes.

Did this answer your question?