Advanced E-Commerce Tracking for the Booking Engine

Modified on Tue, 23 Jul at 7:44 AM

This article provides the events and a recommended way to use it; we did design it to be flexible, allowing you to use it in other ways using other extraction methods. We do recommend using a tracking / digital marketing person to assist you in getting this all setup and configured correctly.


Please note that in all these examples we use a test GTM ID - you need to use your own ID!


Booking engine tracking enhancements

We have added additional event-based tracking enhancements, pushing data through the data layer so you can utilise tools like Google Tag Manager to capture and send it to analytical tools like GA4.

The events we have added in this release are :

  1. add_to_cart

 This event is triggered when a user selects a room and adds it to their cart; the data layer structure of this looks like this :

  1. begin_checkout

  This user-initiated event fires when the user starts the checkout of their booking, and the data layer 

  1. login

    This event fires when the user logs in to start the checkout process and the data layer structure is as follows:

  1. add_shipping_info

This is after login where the user confirms their address details

  1. add_payment_info

    This event fires when the user selects the payment method they wish to use and fills in the details the data passed in the data layer is structured as follows:

  1. purchase

    This event signals that the order is complete and finalises the transaction.

This also now pauses on this URL: https://booking.roomraccoon.com/en/msg/payment-processing//?reservationId=xxxx

Then it will redirect to the redirect URL that one sets in the BE settings.

 The data layer structure is as follows:


Set-up in GTM 

Our recommended method to get the data is to use GTM, adding the main tag here in your booking engine and the GTM ID into the track bookings section:

Then create the triggers for each event in GTM and fire a GA4 event tag for each event, with e-commerce data selected:

An example:


There are other methods and ways that you can do use the data layer, this is just one way.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article