Using analytic tools to understand performance, conversion and user behavior of your Guesty Booking Engine / Website

You can use third-party analytic tools, such as Google Analytics, Google Tag Manager, and Facebook Pixel to track the Booking Engine's performance, including measuring conversion rates, tracking funnel events, listing views, revenue data, and reservation details.

By integrating these tools with the Booking Engine, you can gain a better understanding of your online performance, optimize marketing strategies, and make data-driven decisions to improve your online presence and revenue generation capabilities.

 

Before you begin

  • As of July 2024, Google Analytics is no longer supporting GA3 . Please make sure to complete the migration to Google Analytics 4 as per Google’s instructions.
  • You need to add your Google Tag Manager ID to your Google Tag Manager and also your Google Analytics code to your Google Analytics to retrieve the event's data
  • Campaigns and traffic sources tracking is not supported.

 

Connecting an analytic tool to the Booking Engine

Pro users Lite users

Step by step:

  1. Retrieve your tracking code.
    • For Google Analytics: Register with Google Analytics first and copy your Tracking Code. The correct code format is G-XXXXXX-X, for example, G-000000-2.
  2. Sign in to your Guesty account.
  3. In the top navigation bar, click the icon drop-down menu and select Growth mode.
  4. Click Distribution.
  5. Click the Guesty Booking Engine thumbnail.
  6. Click Edit next to the relevant Engine (Pilot users: click the three vertical dots, and select Edit Booking Engine).
  7. Navigate to the relevant analytic tool section, and paste the relevant tracking code.

 

Difference between GA4 and Universal Analytics

Fundamentally different data models

Universal Analytics (UA, or GA3) was based on sessions and pageviews. GA4 is based on events and parameters. Both methods can collect and tally data, but the output in a report will look different.

Events

UA lets you give “events” a category, action, and label to provide more description and context. An event is counted when an action is triggered. GA4 has no category, action, or label, everything is simply an event.

GA4 has recommended events. There are few events for online sales that Booking-Engine use:

Event

Triggers when a user...

begin_checkout begins checkout. BE uses for start reservation
purchase completes a purchase. BE uses for complete reservation
view_item views an item. BE uses for view property/listing page

More events

Views vs. data streams

In UA, you can have one simple website and a mind-boggling number of views set up. You can see different numbers depending on which view you’re looking at. If you previously set up multiple views in UA, review the data stream settings in GA4 and make sure you’re measuring what matters to your business. One of the benefits of GA4 is you can better see a more accurate reflection of the number of users. For example, a data stream can be a website or a WebApp like Booking-Engine,

 

Google tag - gtag()

Booking-Engine uses Google tag for Google Analytics. Google tag (gtag.js) is a single tag which works with various Google products and services such as Google Ads, Google Analytics. Guesty uses it to implement page view, object view, checkout, and purchase events. These events already set up in Google Analytics and you are not required to do any further configuration, the analytics will be immediately visible to you. 
This Google Tag works with GA4.

 

Why do we use gtag() instead of dataLayer.push()?

There is no difference. gtag() is just a wrapper JS function around dataLayer.push(). However, gtag is preferable.The reason for using gtag is to avoid any action that might pollute or change data inside a dataLayer object by accident, which might affect analytic data.

Also, Guesty sends specific custom events to GA. The information sent with dataLayer.push is not actually sent to GA4, and therefore the events and measurements created with dataLayer.push can only be seen in tag assistant, but not in Google Analytics.

For events and measurements that are not standard in GA4, you can create Custom Events, Custom Dimensions. The data will only be available if the custom events and measurements are logged correctly and there are events sent in the last 24 hours.

You can see the data in GA Debugger and customize Custom Dimensions for Booking Engine / Website custom events, and use it to enhance your data in analytics. These custom events are available for you to implement, using the gtag wrapper.

 

Differences between send events via gtag() and dataLayer.push()

//Sending Event with gtag()

gtag("event", "view_item", {
  currency: "USD",
  value: 100,
  items: [
    {
     item_id: <Property ID>,
     item_name: <Property name>,
     affiliation: <Point of sale (Google etc.)> ,
     index: 0,
     price: <Property price>,
     quantity: 1,
    }
  ]
});

// Sending Event with datalayer.push()
dataLayer.push({
  event: "view_item",
  ecommerce: {
   currency: "USD",
   value: 100,
   items: [
     {
      item_id: <Property ID>,
      item_name: <Property name>,
      affiliation: <Point of sale (Google etc.)>,
      index: 0,
      price: <Property price>,
      quantity: 1,
     }
   ]
});

Since gtag is a wrapper and under the hood it's still the same dataLayer.push() it doesn't need to pass a name and payload value (like ecommerce), nor does it need to be cleared before sending a new one. It uses a single property name like eventModel to pass the payload directly.

More about using gtag in GA4

 

See blow the differences from gtag() and dataLayer.push() events.

gtag()

{
event: "view_item",
gtm: {
uniqueEventId: <Event ID>,
start: <Time in seconds>,
},
eventModel: {
currency: "USD",
value: 100,
items: [
{
item_id: <Property ID>,
item_name: <Property name>,
affiliation: <Point of sale (Google etc.)>,
index: 0,
price: <Property price>,
quantity: 1,
}
]
}
}

 

dataLayer.push()

{
event: "view_item",
ecommerce: {
currency: "USD",
value: 100,
items: [
{
item_id: <Property ID>,
item_name: <Property name>,
affiliation: <Point of sale (Google etc.)>,
index: 0,
price: <Property price>,
quantity: 1,
}
]
}
}

 

Code examples

  • Property page = Event "view_item"
  • Thank you page = Event "complete_purchase"
  • Check out page = Event "begin_checkout"

Google Analytics

Thank You page

gtag (GA4) example:

gtag("event", "purchase", {
transaction_id: <Reservation ID>
currency: <Property currency>,
value: <Property price includes all fees and taxes>,
items: [
{
item_id: <Property ID>,
item_name: <Property name>,
item_category: <Check in date in ISO string>,
item_category2: <Check out date in ISO string>,
item_category3: <Number of guests>,
affiliation: <Point of sale (Google etc.)>,
index: 0,
price: <Property price>,
quantity: 1,
}
]
});

 

Checkout page

gtag (GA4) example:

gtag("event", "begin_checkout", {
currency: <Property currency>,
value: <Property price includes all fees and taxes>,
items: [
{
item_id: <Property ID>,
item_name: <Property name>,
item_category: <Check in date in ISO string>,
item_category2: <Check out date in ISO string>,
item_category3: <Number of guests>,
affiliation: <Point of sale (Google etc.)>,
index: 0,
price: <Property price>,
quantity: 1,
}
]
});

 

Property Page

gtag (GA4) example:

gtag("event", "view_item", {
currency: <Property currency>,
value: <Property price>,
items: [
{
item_id: <Property ID>,
item_name: <Property name>,
item_category: <Check in date in ISO string>,
item_category2: <Check out date in ISO string>,
item_category3: <Number of guests>,
affiliation: <Point of sale (Google etc.)>,
index: 0,
price: <Property price>,
quantity: 1,
}
]
});

 

Facebook Pixel

Thank You page

Checkout page

Property page

 

Next steps

  • You can track guests' successful bookings for either Instant or Request-to-Book policies by using analytics tools such as Google Analytics / Google Tag Manager. See below the URLs for both options:

    For instant bookings:

    Add: /instant-success after the Booking Engine URL. For example: yourdomain.guestybookings.com/instant-success

    For inquiries or booking requests:

    Add: /inquiry-success after the Booking Engine URL. For example: yourdomain.guestybooking.com/inquiry-success

Was this article helpful?
0 out of 1 found this helpful