Medio's Online Book an Appointment system now has GA4 and GTM integration.
In the following events, the attached data will be entered into DataLayer:
Specialist / professional choice
dataLayer.push({'event': 'cleanup','ecommerce': null});
dataLayer.push({
'event': 'select_item',
'ecommerce': {
'items': [{
'item_name': 'Dr. Minta Ágnes', // Specialty / Doctor's name
'item_id': '302194', // specialty ID / Doctor ID, string
'item_category': 'Specialist', // Specialist's selector
/ Specialist selector
'index': 1 // Position in the list, integer
}]Selected examinations list
The Next code will be executed when the list of examinations for the specialty appears. If the examination is custom priced, the price parameter is not cleared when sent, but the custom_price parameter is set to true.
dataLayer.push({'event': 'cleanup','ecommerce': null});
dataLayer.push({
'event': 'view_item_list',
'ecommerce': {
'currency': 'HUF', // currency
'items': [{
'item_name': 'Capillary microscopy, including basic dermatological examination', // Specialization name *
'item_id': '43622', // Examination ID, string
'item_category': 'Child Dermatology', // Name of the category
'price': '43900.00', // Examination price, double
'custom_price': false, // If Unique price then true, otherwise
false
'index': 1
}, {Next Examination}]
} });Examinations selected
When the User clicks on a Selected examination, the following code is executed:
dataLayer.push({'event': 'cleanup','ecommerce': null});
dataLayer.push({
'event': 'select_item',
'ecommerce': {
'currency': 'HUF',
'items': [{
'item_name': 'Capillary microscopy with basic dermatological examination',
'item_id': '43622',
'item_category': 'Child Dermatology', 'price': '43900.00',
'custom_price': false,
'index': 1
}] }
});Appointment selection page(s)
When the user arrives at the interface that lists the appointments for the doctor/specialty, the following code is executed:
dataLayer.push({'event': 'cleanup','ecommerce': null});
dataLayer.push({
'event': 'view_item',
'ecommerce': {
'currency': 'HUF',
'items': [{
'item_name': 'Capillary microscopy with basic dermatological examination',
'item_id': '43622',
'item_category': 'Child Dermatology', 'item_category2': 'Capillary microscopy, dermatological
with basic examination',
'price': '43900.00',
'custom_price': false,
'doctor_id': '168159' // Doctor ID, string }, {Next Doctor}]
} });After selecting a date
If the User selects an available time, the following code will be executed:
Reserve button
When the User starts the finalization process, the following code is executed:
dataLayer.push({'event': 'cleanup','ecommerce': null});
dataLayer.push({
'event': 'add_to_cart',
'ecommerce': {
'currency': 'HUF',
'items': [{
'item_name': 'Capillary microscopy with basic dermatological examination',
'item_id': '43622',
'item_category': 'Child Dermatology', 'item_category2': 'Capillary microscopy, dermatological
with basic examination',
'price': '43900.00',
'custom_price': false,
'doctor_id': '168159',
'item_variant': '2023-02-17T09:00:00+00:00',
'location': 'Institution name'
}]
} });Personal data
If the User fills in the reservation data required, the following code will be displayed:
If the User fills in the reservation data required, the following code will be displayed:
Successful Book an appointment
If the user finalises the appointment and it is successfully entered in Medio, the following code will be executed:
dataLayer.push({'event': 'cleanup','ecommerce': null});
dataLayer.push({
'event': 'purchase',
'ecommerce': {
'currency': 'HUF',
'value': '43900.00', // total with tax, double
'tax': 0.00, // tax content or 0.00 double
'transaction_id': '375a111f-4bab-4ec1-b7f6-f77bf84bdb0b', //
'transaction ID
'coupon': '', // Coupon code or empty string
'affiliation': 'Medio', // Current value
'items': [{
'item_name': 'Name: Examination',
'item_id': '43622',
'item_category': 'Child Dermatology', 'item_category2': 'Capillary Microscopy, Dermatology
with basic examination',
'price': '43900.00',
'custom_price': false,
'doctor_id': '168159',
'item_variant': '2023-02-17T09:00:00+00:00',
'location': 'Institution name'
}] }
});Cancellation of an appointment
If the user cancels their appointment online, the following code will be executed:
dataLayer.push({'event': 'cleanup','ecommerce': null});
dataLayer.push({
'event': 'refund',
'ecommerce': {
'transaction_id': '375a111f-4bab-4ec1-b7f6-f77bf84bdb0b'
}
});Date to be changed
When changing the date, we must first send a refund event and then a new purchase event, with the same transaction id as the first one, with the modified item_variant parameter.