Measuring conversions with GA

Since Booking Engine is integrating into your website under your main domain, measuring conversions (goals) is easy using integrated GTAG + GA on Website.

First of all you have to know WebBookingPro is sending events using window.dataLayer global variable.

There are several events WebBookingPro sends.

First is event “begin_checkout” that is pushed once visitor chooses room with “Reserve” button, and moves to 2nd Step (a Step where he needs to fill personal data and confirm reservation). This event sends additional info about selected room type, price, currency, used coupon and discount. Example:

{
“event”: “begin_checkout”,
“ecommerce”: {
“items”: [
{
“currency”: “EUR”,
“coupon”: “”,
“item_id”: 13,
“item_name”: “Spa Premium Room”,
“quantity”: 1,
“price”: 262.6,
“discount”: 0
}
]
}
}

Usually this event is not treated as “conversion/goal” since this is not confirmed reservation, but it is useful to measure how many visitors choose a room and compare to number how visitors at the end finish/complete reservation.

Once the visitor confirms reservation another event is pushed. If the hotel is using payment gateway to confirm booking at that stage, a event called “initiate_purchase” is pushed. If there is no more action required from visitor then event called “purchase” is pushed. Purchase event is also pushed once payment was successful and redirected back to “Success” page of booking engine. Example of purchase event

{
“event”: “purchase”,
“ecommerce”: {
“transaction_id”: “XXXXXXX”,
“affiliation”: “”,
“value”: 262.6,
“tax”: 2.0,
“extras”: 0,
“coupon”: “”,
“currency”: “EUR”,
“items”: [
{
“currency”: “EUR”,
“coupon”: “”,
“item_id”: 13,
“item_name”: “Spa Premium Room”,
“quantity”: 1,
“price”: 262.6,
“discount”: 0
}
]
}
}

Purchase event should be treated as conversion/goal.

If the hotel “Thank you/Success” page is not used default by Booking engine (hotel has own “static” web page for Successfull reservation), conversion goal is usually measured as visit to this URL. But Our system sends additional data as GET parameter to this URL. For example if final URL is https://hotelwebsite.com/thank-you/ we send following link

https://hotelwebsite.com/thank-you/?bookingId=XXXXXX&value=100&extras=0&tax=0&currency=EUR&coupon=XXXX.

Be aware this mode is not preferred since sending any data as GET parameter is generally considered as NOT SECURE.

Steps to connect GA and GTAG manager are:

  1. GA4 and GTAG have to be connected.
  2. Thorugh Triggers menu create new trigger with type “Custom Event”. For one use event name “begin_checkout” for another “purchase”.
  3. Now you have to “Pass” this custom event to “GA4”. From Tags menu create new “GA4 Event” Tag that is triggered by each custom event – so you should have 2 separate Tags for each custom event.
  4. Create Data Layer Variables for each variable you want to measure ecommerce.transaction_id , ecommerce.value, ecommerce.currency, ecommerce.tax, ecommerce.items ad then for Tag under “Event Parameters” map that parameterer transaction_id uses {{DLV – ecommerce.transaction_id}} and so on. Usually More Settings -> Ecommerce -> Send Ecommerce data is enough to forward Datalayer to GA4
  5. Publish GTM