If you use the same GTM Container ID on both the embedded iframe and website, you will want to avoid duplicate tracking. This can be achieved a couple ways: 

  • Adding exceptions to your website;
  • Removing GTM code from the page the iframe is embedded. 

Removing GTM code from your website is pretty straightforward. This guide will show you how to add an exception to prevent tags from firing on your website page with Cliniko embedded. 

Adding Exceptions to avoid duplicate tracking in the embedded iFrame

 
You can add an Exception so tags don'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?