Setting up the base listener for enhanced tracking
In this article, you will learn how to get enhanced ecommerce events in your GTM dataLayer. You can use these as triggers for further tracking . This recipe includes nine events -view_item_list, select_item, view_item, add to cart, view_cart, remove_from_cart, begin_checkout, add_payment_info, and purchase. All events are logged with standard ecommerce payloads like value, currency, and item details.
Installing the Rezgo Base GTM Listener
Rezgo automatically broadcasts standard ecommerce events as they happen. To capture these, you will need to import our GTM Listener Recipe. This recipe contains a script that “listens” for messages from the Rezgo iframe and translates them into standard GTM events.
Prerequisites
Before importing the recipe, ensure you have:
- Google Tag Manager installed on your website in the parent frame (more info).
- Publishing rights in Google Tag Manager
Importing the Rezgo Base Listener
To simplify your setup, we provide a pre-configured GTM container file.
- Download the tracking recipe here: Rezgo Base Listener
- In GTM, navigate to Admin > Import Container.
- Choose the downloaded file and select your Existing workspace.
- Important: Choose Merge as the import option and select Rename conflicting tags to ensure you don’t overwrite your existing setup.
- Click Confirm.
Configuration steps
After importing, you only need to perform one manual step:
- Enter Preview Mode in GTM and perform a test booking on your booking website. You should see the ecommerce events appearing in the summary column.
- Once verified, hit publish in GTM.
Supported ecommerce events
Rezgo supports nine standard events that follow the GA4 schema. This allows you to track the entire customer journey, from browsing tours to the final purchase.
| Event Name | Meaning | Trigger Point |
| view_item_list | Product Impression | User views a list of tours or activities. |
| select_item | Product Click | User clicks on a specific tour from the list. |
| view_item | Product Detail View | User views the detailed description page of a tour. |
| add_to_cart | Add to Cart | User adds a tour/ticket to their booking selection. |
| view_cart | View Cart | User reviews their selected items before checkout. |
| remove_from_cart | Remove from Cart | User removes an item from their selection. |
| begin_checkout | Start Checkout | User clicks “Continue to Payment” after filling out contact info. |
| add_payment_info | Payment Info | User enters payment details or selects a payment method. |
| purchase | Conversion | User successfully completes the booking. |
Data payload & schema
Every event includes a “Payload”, a collection of data about the tour, price, and currency.
Key Data Points Captured:
- Items Array: Details including item_id, item_name, price, and quantity.
- Monetary Value: Total value and currency (e.g., CAD, USD).
- Marketing Data: coupon codes and discount amounts for promotional tracking.
- Customer Data (Purchase Only): Hashed user_data (email, phone, address) is included in the purchase event to support Enhanced Conversions in Google Ads and Meta.
Example: The Purchase Event
When a booking is completed, Rezgo pushes a rich data object into your Data Layer:
// Example of a successful purchase payload
{
event: "purchase",
rezgoEvents: true,
ecommerce: {
transaction_id: "5Y1H4K9D6C9Q4Q5I",
value: 100, // Total transaction amount excluding tax.
tax: 4.9, // Any fees applied
currency: "CAD",
coupon: "HALFOFF", // Optional if applicable
discount: 100, // Optional if applicable
items: [
{
item_id: "392458",
item_name: "Craft Brewery Tour",
item_category: "Tasting Tour",
price: 50,
affiliation: "Rezgo",
quantity: 2,
coupon: "HALFOFF", // Optional if applicable
discount: 100, // Optional if applicable
index: 1
}
]
},
user_data: { // Used for Meta & GAds matching
email: "name@domain.com",
phone_number: "1234567890",
address: {
first_name: "fname",
last_name: "lname",
street: "street name",
city: "city",
region: "AB",
postal_code: "123456",
country: "CA"
}
}
}
