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, or 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:
Checklist
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.
Tracking the referral source
If you wish to track the referral source, we need to ensure cross domain tracking is working. This can vary depending on how your website is configured. Here are some tips to help:
To help with cross domain tracking, we can add some extra parameters in the "Fields to Set" section:
Some context around the extra parameters:
"cookie_flags" set to "samesite=none;secure"
In 2020, Chrome updated how cookies are shared across sites as part of ongoing security and privacy enhancements. More context can be found here: https://developers.google.com/search/blog/2020/01/get-ready-for-new-samesitenone-secure
"allowLinker" set to "true"
This allows domains to pass the Client ID, where the tracking data is stored.
It's recommended to follow Google's support guides on configuring Cross Domain Tracking in Google Analytics: https://support.google.com/analytics/answer/10071811?hl=en
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 4? Check out 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 π€