Meta Pixel (previously known as Facebook Pixel) is an analytics tool that allows you to record and measure your patients and visitors' online actions and behaviors (such as online bookings). Using a Custom Image Tags, it's possible to incorporate your Meta Pixel into your Google Tag Manager account. This will enable you to evaluate and further refine the outcomes of your Meta advertising.
🚨 Please note that Cliniko has limited support for Google Tag Manager (GTM) tags. Security is our main concern with anything we do at Cliniko. We've hand-picked the most suitable Google Manager Tags to accommodate the majority of tracking needs whilst honoring our promise to never compromise on data security. The Custom Image tag is the alternative implementation for connecting the Meta pixel directly with GTM.
This guide will walk you through the following steps to get you up and running:
What’s needed?
Here's what you will need before getting started:
Create a Meta Pixel
Once the above steps are completed, we will now configure your Google Tag Manager account so it works with your Meta Pixel tag.
Configuring the Custom Image Tag for Meta Pixel
While Meta documentation suggests using the Custom HTML Tag to connect with Google Tag Manager (GTM), we found the Custom Image Tag to be the better choice for security reasons.
To get started, you'll want to retrieve your Meta Pixel ID from your Meta Business Manager account. Within your Business Settings on Meta Business Manager, choose your business and select Pixels under Data Sources (in the menu):
You will now see the list of the website pixels that you have created. Clicking on the Pixel ID will copy the number for your clipboard:
From here, login to your Google Tag Manager account and select to add a "New Tag" from your Tag Manager Workspace:
Give your Tag a title (top-left) and then click anywhere in the "Tag Configuration" area:
Scroll down a little and choose the "Custom Image Tag" under the "Custom" section:
Image Tag URL
In order to generate the Image URL for your Custom Image Tag, you'll want to add your Meta Pixel ID to the following code/URL by replacing the {PixelID}
. Do not replace {PageURL}
:
https://www.facebook.com/tr?id={PixelID}&ev=PageView&dl={{Page URL}}
You'll need to fully replace the {PixelID}
, including brackets so it should look like this:
https://www.facebook.com/tr?id=123456789&ev=PageView&dl={{Page URL}}
After adding the Image URL, make sure to leave "Enable Cache Busting" ticked and "gtmcb'' set as the default Cache Buster Query Parameter.
Don’t save just yet, now we’ll work on configuring the Tag Trigger settings.
Setting up the Tag Trigger
To track all visitor activity, you can fire the Meta Pixel across all online booking pages. To fire your tag across all booking pages, we’re going to configure the Tag Triggers.
Under the Tag Configuration section, click anywhere in the "Triggering" field:
From here, from the Choose a trigger list, select "All Pages":
You can now Save the tag which will then be added to your list of Tags in Google Tag Manager. Don't forget to Publish your workspace changes in GTM.
Reporting Conversions in Meta Business Manager
To report conversions, we can set up a “Custom Conversion” in Meta Business Manager to record when a booking has been completed. A booking is defined as "completed" when the patient/client reached the "bookings/confirmation" page in the booking process.
To set this up, start by logging into your Meta Business Manager account.
Navigate to the "Custom conversions" page and then choose to "Create Custom Conversion":
When completing the custom conversion form, here are some things to keep in mind:
Name: Add a suitable name for the custom conversion.
Data source: Choose the same Pixel used with the Custom Image tag configuration in Google Tag Manager (GTM).
Conversion event: Leave this field as default (All URL traffic).
The "Rules" section is the important bit. Type "bookings/confirmation" into the field and hit Enter on your keyboard. Leave the default parameters URL and Contains.
Now that we've created the custom conversion, we'll test our Meta Pixel to ensure it's actually working for visitors!
Testing Meta Pixel
Unsure if everything is working properly? We highly recommend installing the Meta Pixel Helper Chrome browser extension as well as checking your Meta Business Manager testing data:
Once you've installed and enabled the Chrome Extension, head over to your Cliniko online bookings page or the website where you have Cliniko bookings embedded. Load the Facebook Pixel Helper Chrome Extension and see if your Pixel has fired:
In your Meta 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:
Custom conversions can take a few hours to appear in Meta Business Manager.
Now you're all set 🎉!