Knowledgebase
Maestrel > Help Desk > Knowledgebase

Browse our knowledgebase...




 
Knowledgebase » How to ... »

How to track conversions with GA4?

Answer

How can I check if visits to my website convert into reservations? How to use Google Analytics 4 with HBook to compare visits to my website and finalization of reservations?

  • If you haven't a Google Analytics account set, with GA4 property and Data collection set, then follow the steps below, which are detailed in this article: https://support.google.com/analytics/answer/9304153 :
    • Create an Analytics account
    • Create a new Google Analytics 4 property
    • Add a data stream for your "Web"
    • Set up data collection for your website: If you wish to use Google Site Kit, you will connect your Google Site Kit to your Google Analytics Property at this step. Google Site Kit takes care of adding the code on your website pages.
    • Don't forget the checkbox for "User Data Collection Acknowledgement" (in Admin - Data collection and modification - Data collection). No data will be collected until you acknowledge it.
  • HBook allows you to split the booking process in different steps that can be done on different pages:
    • Step 1 : Search form page / Accommodation booking page. You will set the redirection to your "Main booking page" with the parameters "search_only" and "redirection_url".
      • On a global search form, you can set that the results of the search will be displayed on a different page. The user enters check-in date and check-out date, number of guests (if relevant) and is redirected to a different page. Here is an example of shortcode for this behavior: [hb_booking_form search_only="yes" redirection_url="https://www.abc.com/main-booking-form"]
      • On a global search form, you can set that the user is redirected to a different page only once he has selected the accommodation he wishes to book. Here is an example of shortcode for this behavior: [hb_booking_form redirection_url="https://www.abc.com/main-booking-form"}
      • On an accommodation form, you can set that the user is redirected after the results of his search. Here is an example of shortcode for this behavior: [hb_booking_form accom_id="123" redirection_url="https://www.abc.com/main-booking-form"]
    • Step 2 : Extra-services, Customer details and Payment. You will set the redirectin to your "Thank you page" with the parameter "thank_you_page_url". On this second page (the "Main booking page"), you will have a booking form, and you can set a redirection for the last step.  Here is an example of shortcode for this behavior:[hb_booking_form thank_you_page_url="https://www.abc.com/thank-you-page"]
    • Step 3 : Thank you page. On this page you will have a shortcode [reservation_summary]. The user will be redirected to this page only when the reservation is finalized, be it that an online payment is required or not.

 

  • With the above, we can create conversions in Google Analytics 4, for example, to get an idea of how many users actually go throw the different steps. As an example, here is how to set a conversion for users reaching the "Thank you page", which is when the reservation process has been completed (with or without online payment).
    • In Admin - Data display - Events, you will create an event as follows: Google Analytics Create Event
     
    • In Admin - Data display - Conversions, you will set that this event is to be considered as a conversion:Google Analytics Create conversion

 

  • You can create different conversion events, to measure the page views of each Step of the booking process. You will create a new event for each measurement. For example, you can create an event "main_booking_page" and set is as a different conversion: by doing so, you compare how many visitors land on your website (automatically done with "Page Views" counts, switched on by default on GA4) with how many visitors reach your "Main booking page" and how many actually finalize their booking.
  • You can as well set additional parameters for a finer tuning of what you are tracking. For example, let's say I wish to check how many finalized reservation are done from my page where I have an Accommodation list (in this example, the URL contains "accommodation-list"): Google Analytics Conversion Accom List

 

Related articles How to display the results of a search in a new page? Is it possible to redirect the customer to a different page to view the results of the search?
How to track conversions in HBook with Google Analytics?
Can I set a Privacy Policy checkbox? Is HBook ready for European GDPR (General data protection regulation)?
The search form does not display any results. It keeps reloading the page.
How to use a different page to display my accommodation types?
Themes Booking Plugin Pricing Blog Contact