What it does?
Third party tracking via Google Analytics allows you to track Healthengine Web-Plugin bookings from their originating traffic source or campaign (for example Google Ads) within your own Google Analytics 4 account. This solution ensures patient data is protected.
Requirements checklist?
The following steps are required to ensure that Google Analytics Web-Plugin bookings will track correctly. This document will go through these requirements further in the sections below.
- Provide healthengine’s Support team with your Google Analytics 4 IDs.
- Modify your Google Analytics code on your website to enable cross-domain tracking.
- Set up cross-domain measurement via GA4 Admin
- Add healthengine.com.au as a unwanted referral in your GA account.
- Set up custom dimensions to view additional event parameters (optional)
- Set up conversion by marking event (optional).
- Link Google Analytics & Google Ads (optional).
Web-Plugin Google Analytics Setup
Provide healthengine support with your Google Analytics 4 ID
In order to send the data into your Google Analytics account, we will need to be provided
with your Google Analytics IDs for each practice location you want to track healthengine
Web-Plugin bookings in. The Google Analytics 4 ID should be similar to the format of G-AB12CDE3FG.
If you have one of the older Google Analytics IDs that start with “UA-” for Universal
Analytics, and don’t already have a GA4 account, you will need to migrate to GA4. Please
see this article for further details.
To find your Google tag ID (which usually starts with "G-"), do the following
- Sign in to your Google Analytics account.
- In Admin, under Data collection and modification, click Data streams
- Click the data stream.
Don't see a Data streams option in the Property column? You have a Universal Analytics property instead of a GA4 property. |
4. Find the measurement ID in the first row of the stream details.
Modify your Google Analytics code on your website
In order to activate cross-domain tracking for your Google Analytics account between your
practice’s website and healthengine, the on-page Google Analytics code will need to be
modified. This allows your website to transfer the visitors unique ID that Google Analytics
uses to ensure that they are seen as 1 unique visitor and not 2.
PLEASE NOTE THE FOLLOWING IS CURRENTLY NOT SUPPORTED:
|
To implement:
1. Add the following code on your website immediately after the openingHTML tag and within your <head> tags on every page that contains the Healthengine widget replacing the highlighted ‘YOUR-GA4-ID’ with your own Google Analytics 4 ID:
<script async src="https://www.googletagmanager.com/gtag/js?id=YOUR_GA_MEASUREMENT_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('set', 'linker', {'domains': ['healthengine.com.au']});
gtag('js', new Date());
gtag('config', 'YOUR_GA_MEASUREMENT_ID', { cookie_flags: 'SameSite=None;Secure' });
</script>
Once implemented the healthengine web-plugin booking complete URLs will start to be tracked within the Google Analytics Pages report as well as the Events report with the category of “healthengine”, the action of “OBS Webplugin Booking Complete” and the label that contains your healthengine practice ID following by the practice name (e.g. 12345 – Perth Medical Centre). Please continue reading to continue setup.
Set up cross-domain measurement via GA4 Admin
You need the Editor role to set up cross-domain measurement.
PLEASE NOTE: Check your tag (e.g. the Google tag on each of your HTML pages) for each domain that you want to include in your cross-domain measurement. The tag on each page must use the same tag ID (i.e., the same "G-" ID) from the same web data stream. |
- In Admin, under Data collection and modification, click Data streams.
- Click Web, then click a web data stream.
- In the web stream details, click Configure tag settings (at the bottom).
- In the Settings section, click Configure your domains.
- If you use the same Google tag across domains, they are automatically detected and show up in the Recommendations section. To accept a recommendation, click Add.
To manually add a domain, click Add condition under Include domains that match the following conditions:- Choose the match type of “Contains”
- Under Domain, enter healthengine.com.au
- Repeat to add your own domain as another condition.
- Click Save.
Add Healthengine as an unwanted referral
When a user journey crosses from your website domain to the healthengine.com.au domain, Google Analytics interprets that as the user having been referred by your domain to healthengine.com.au, and Google Analytics creates a new session. If you want to be able to measure a single session across multiple domains, you need to list your tracked domains to the unwanted referral list. This is required to see the original traffic source (for example a Google Ads campaign) that resulted in a booking via the web-plugin.
To add healthengine.com.au as an unwanted referral, follow these steps. You will need the editor role in GA4 to do this:
- In Admin, under Data collection and modification, click Data streams.
- Click Web and then click a web data stream.
- In the web stream details, click Configure tag settings (at the bottom).
- In the Settings section, click Show all to see all available settings.
- Click List unwanted referrals.
- Under Include referrals that match ANY of the following conditions:
- Choose the “Referral domain contains” match type.
- Under Domain, enter healthengine.com.au.
- Click Save.
Click here for more info.
Set up custom dimensions for event parameters (optional)
The “OBS Webplugin Booking Complete” event also sends through additional event parameters which you can capture in GA4 if you wish.
The current set of event parameters sent through are as follows:
Event parameter | Scope | Description |
practice_name | Event | The name of the practice that was booked |
practice_id | Event | The healthengine ID for the practice that was booked |
specialty | Event | The specialty the booking was made for |
appointment_type | Event | The appointment type the booking was made for |
appointment_date | Event | The date the booking was made for |
payment_method | Event | The payment method used for the booking (if applicable) |
value | Event | The revenue amount (if applicable) |
To set these up and have this data flow into your events report:
- In Google Analytics, click Admin.
- Make sure you are in the correct account and property.
- In Admin, under Data display, click Custom definitions.
- In the Custom dimensions tab, click Create custom dimensions.
- Complete the following information:
- Dimension name: Enter a unique name for the dimension.
You can't use hyphens in the name, but you can use underscores and spaces instead.
- Scope: Choose a scope for the custom dimension. See table above.
- Description: Enter a memorable description for the custom dimension.
- Event parameter/User property: Choose the source of data. See table above.
- Click Save.
You will see a value of (not set) for a custom dimension in the first 48 hours.
For more information on setting up custom dimensions in GA4 click here.
Mark event as conversion (optional)
If you would like to see Healthengine Widget Booking Completes within Google Analytics conversion report in additional to the event reports which happen automatically this requires setup within your Google Analytics account via the following steps:
- In Google Analytics, click Admin.
- Make sure you are in the correct account and property.
- In Admin, under Data display, click Events.
- In the Existing events table, for the “OBS Webplugin Booking Complete” event select the toggle under Mark as conversion.
If you can't select the toggle, you don't have the necessary permissions.
When you mark an event as a conversion, it can take some time (from a few minutes up to a few hours) for the configuration to apply to the event.
Marking an event as a conversion affects reports from time of creation. It does not change historic data. When you mark an event as a conversion, allow up to 24 hours for it to show up in standard reports. Realtime reports update sooner, at some time after a user triggers a conversion event.
Event setup for multi-location practices (Optional) If you have multiple practice locations tracked under the one Google Analytics account, you can use the “create event” feature in GA4 to set up individual conversion events for each location.
One example of how you can set up the event for an individual practice is as per the below screenshot using the practice_id parameter that is also sent with the OBS Webplugin Booking Complete event. The practice_id for your practice can be found on the end of your healthengine profile URL after the “s”, for example:
Click here for more information on marking events as conversions within Google Analytics 4. |
Finding the Web Plugin Data in GA4
Once all the required steps have been set up you will be able to find the OBS Webplugin Booking Complete event data in the same Google Analytics 4 account you provided Healthengine support staff with via the following methods:
Event Report
When someone performs the action that triggers the custom “OBS Webplugin Booking Complete” event, the event will appear in the Realtime report and DebugView. You can also click the “OBS Webplugin Booking Complete” event name in the Realtime report and DebugView to see its event parameters.
When Analytics processes your custom event, you can use the following to see the event:
- In Reports, go to the Events report.
- In Admin, under Data display, click Events.
- In Explore, create a free-form exploration with the Event name dimension.
Conversion Report (If event marked as a conversion)
The Conversions report surfaces information about each conversion event.
To view the conversion report:
- Sign in to Google Analytics.
- From the left menu, select Reports .
- On the left, click Engagement > Conversions.
As an Editor or Administrator, you can add the report if it isn't available in the left menu.
Comments