GuestCentric Support PageGuestCentric Support Page

menutoggle

Integrating Guestcentric DataLayer with Google Tag Manager (GTM)

HOME > Google Analytics and Tag Manager > Integrating Guestcentric DataLayer with Google Tag Manager (GTM)

This guide outlines the standard DataLayer events and structure used in the hotel booking engine for integration with Google Tag Manager.

Google Tag Manager (GTM) is a third-party tool provided by Google.

Our team provides this DataLayer documentation as a reference guide only. We do not offer direct implementation, configuration, or troubleshooting support for Google Tag Manager tags, triggers, or variables. For GTM-specific setup and technical assistance, please refer to Google's official GTM documentation and support channels.

Standard Events

These events track basic user actions and page views.

Event name: page_view
TriggerAutomatic page navigation tracking

Custom Events

Event name: custom event name
Trigger: User interactions, custom tracking points

E-commerce Events

The booking process is tracked through a sequence of four events:

1. Begin check-out event

- Event name: begin_checkout
- Trigger: 
When the user starts the checkout process
- Purpose: Standard Ecommerce tracking

2. Add-payment event

- Event name: add_payment_info
- Trigger:
When the user adds payment information
- Purpose:
Standard Ecommerce tracking

3. Booking completion event

- Event name: booked
- Trigger:
When the booking is successfully completed
- Purpose:
Comprehensive booking details (Reservation, Pricing, Guest info)

4. Purchased Event (GA4 Enhanced Ecommerce)

- Event name:
purchase
- Trigger:
Fired separately after booking completion
- Purpose:
GA4 Enhanced Ecommerce compatibility


Key DataLayer Objects (Booking Completion: booked event) 

The booked event provides a comprehensive data structure for successful reservations, organized into specific objects:

1. Reservation Details (gcReservation): This object contains core booking information

- code: Hotel reservation code (e.g., 'BOOKING_12345')
- propertyName: Hotel name (e.g., 'Grand Hotel')
- offer: Room type + rate plan name (e.g., 'Deluxe Room - Best Available Rate'
- checkin / checkOut: Dates in YYYY-MM-DD format
- nights: Number of nights calculated from dates
- adults / children: Number of guests
- addons: Array of addon objects, including name and netPriceTotal

2. Price Details (gcPrice): All monetary values are in the currency specified in the currency field

- currency: Currency code (e.g., 'USD')
total: Total price including taxes and fees (e.g., $949.97)
- net: Net price before taxes/fees (e.g., $849.97)
- taxes / fees: Total amounts for taxes and fees
- perUnit: Price per unit (room)

3. Guest Information (gcGuest): Contains primary guest details

- name: Full name (e.g., 'John Doe')
- city, zip, country: Location information
payment: Payment method name (e.g., 'Visa')

4. Metadata & UTM Parameters: Includes system information and marketing campaign details

gcReferer: Booking referrer URL (e.g., 'https://google.com')
gcChannelKey: Booking channel identifier (e.g., 'direct_booking')
- utm_source, utm_medium, utm_campaign, utm_content: Standard UTM parameters captured from the current route query


Implementation Notes

- All montery values are in the currency specified in the currencey field
- Dates are in YYYY-MM-DD formaT
- The nights value is automatically calculated from check-in/check-out dates
- transactionProducts includes both rooms and addons items
- UTM parameters are capture from the current route query parameters
Events only fire when analytics cookies are accepted by the user


Do you have any other questions regarding GTM tracking?

Contact our support, and we will happily to help support@guestcentric.com