Using analytics tools in your Guesty Booking Engine (Booking Website for Lite users)

You can use third-party analytic tools such as Google Analytics, Google Tag Manager, and Facebook Pixel to track your Guesty Booking Engine's performance (Booking Website for Lite users), including measuring conversion rates and number of visits. Understanding your online performance can help you optimize marketing strategies and make data-driven decisions to improve your revenue generation capabilities.

The functions of tracking campaigns and traffic sources are currently not supported in the Guesty Booking Engine.

Set up your analytics tools 

Google Analytics 4

Google Analytics (GA) allows you to collect, analyze, and interpret user behavior data. You can track different metrics, such as the number of visitors, on-site behavior, and conversions (e.g., booking reservations). The Guesty Booking Engine sends events to Google Analytics automatically. 

As of July 2024, Google Analytics 3/Universal Analytics (UA) is no longer supported by Google Analytics. If you’re using it, complete the migration to GA4.  Learn more about the differences between GA3 and GA4.

To integrate GA4 with your Guesty Booking Engine, retrieve your GA4 Measurement ID. Then, add it to your Guesty Booking Engine settings. 

Google Tag Manager

Google Tag Manager (GTM)  allows you to manage and deploy marketing tags (snippets of code or tracking pixels) on your Guesty Booking Engine. Google tags work with various Google products and services such as Google Ads, and Google Analytics.

You can use tags to track conversion rates, user behavior, and other key metrics, without needing to access your website’s source code. You can configure certain events to be tagged and gather data related to each event, such as counting how many times a button was clicked. 

Guesty uses GTM to implement page-view, object-view, checkout, and purchase events. (see the code examples to track these events). These events are already set up in Google Analytics. You can use these tracking codes without any further configuration.

You can create custom events and dimensions to track non-standard events in GA4. Custom events are user interactions or actions you define that GA4 does not automatically track, such as a specific button click, a video play, or a form submission. Custom dimensions are attributes or categories you can assign to these events to give them more context (e.g., the page the event occurred on, the user type, or the device type).

Custom events must be correctly logged and sent within the last 24 hours to be visible in your analysis. You can view this data in Google Tag Manager Assistant (see below) and use it to enhance your analytics.

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

We use gtag() for tag management in the Guesty Booking Engine, instead of dataLayer.push(). While gtag() and dataLayer.push() essentially perform similar functions, gtag() acts as a wrapper around dataLayer.push(). gtag() is generally preferred because it helps prevent accidental changes to the dataLayer object, that could impact your analytics data. Also, Guesty Booking Engine sent specific custom events are sent to GA4. Data pushed with dataLayer.push() does not directly reach GA4; it appears only in Tag Manager Assistant and not in GA4 directly.

See the following differences between gtag() and dataLayer.push() codes.

//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,
     }
   ]
});

In the example above, note that gtag doesn't need to pass a name and payload value (like e-commerce), and doesn’t need to be cleared before sending a new value. It uses a single property name like eventModel to pass the payload directly.

To integrate GTM with your Guesty Booking Engine, retrieve your Google Tag ID, and add it to your Guesty Booking Engine settings.

Google Tag Manager Assistant

Google Tag Manager Assistant It is a browser extension, designed specifically for debugging, validating, and monitoring tags implemented through Google Tag Manager (GTM).  It provides real-time insights into the firing tags, their configurations, and any errors or issues affecting their performance.

Meta (Facebook) Pixel

Meta Pixel is a code segment you can place on your website to track visitor activity and conversions.  When someone visits your site and takes an action (such as making a reservation), the Pixel code sends this information back to Facebook. You can use this data to understand how visitors interact with your site after clicking on your Facebook ads.

To integrate Meta Pixel with your Guesty Booking Engine, retrieve your Pixel ID. Then, add it to the Guesty Booking Engine settings.

Connect your analytics tools to the Guesty Booking Engine

Pro users Lite users

Step by step:

  1. Retrieve your tracking code (See above).
  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 the three vertical dots next to the relevant Booking Engine, and select Edit Booking Engine.
  7. At the left side bar, click Web analytics (optional).
  8. Navigate to the relevant analytic tool section, and paste the relevant tracking code.
  9. Click Save Booking Engine.

Code examples

Track page view events

This event tracks the number of page views. The event is triggered when a user moves from a previous page to a new page.

Google Analytics 4 (Google Tag Manager) 

gtag("event", "page_view", {
page_location: "/en/properties"
})

Track property page view events

This event tracks the number of visitors browsing a specific property page. When a visitor enters a property page, the event is automatically sent to Google Analytics as long as the check-in and check-out dates and the minimum number of guests are specified  (see the example below).

Google Analytics 4 (Google Tag Manager) 

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,
}
]
});

Meta (Facebook) Pixel

Track the beginning of a booking process

The event tracks when a user accesses the reservation “check-out” page, marking the start of the reservation process. 

Google Analytics 4 (Google Tag Manager) 

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,
}
]
});

Meta (Facebook) Pixel

Track the event of booking a reservation

This event tracks when a guest is directed to a reservation “confirmation” page, once the reservation has been sent.

This event model depends on whether the reservation is for a single listing or multiple listings (“group reservation”). 

To track a guest’s successful booking, use the following URLs  for Instant or Request to Book policies: 

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

Google Analytics 4 (Google Tag Manager) 

Single reservation:

gtag("event", "purchase", {
transaction_id: <Reservation ID>
currency: <Property currency>,
value: <Property price includes all fees and taxes>,
tax: <Reservation total tax>,
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>,
item_category4: "Single reservation", //Type of reservation
affiliation: <Point of sale (Google etc.)>,
index: 0,
price: <Property price>,
quantity: 1,
}
]
});

Group reservation:

gtag("event", "purchase", {
transaction_id: <Reservation ID>
currency: <Property currency>,
value: <Property price includes all fees and taxes>,
tax: <Reservation total tax>,
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>,
item_category4: "Group reservation", //Type of reservation
item_category5: <Group reservation ID>
affiliation: <Point of sale (Google etc.)>,
index: 0,
price: <Property price>,
quantity: 1,
}
]
});

Meta (Facebook) Pixel

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