Search Icon
Skip to main content
Knowledge Base

Setting up the base listener for enhanced tracking

You can return to our guide to enhanced ecommerce tracking in Rezgo for additional steps or to learn more about Rezgo’s advanced analytics.

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. 

  1. Download the tracking recipe here: Rezgo Base Listener
  2. In GTM, navigate to Admin > Import Container.
  3. Choose the downloaded file and select your Existing workspace.
  4. Important: Choose Merge as the import option and select Rename conflicting tags to ensure you don’t overwrite your existing setup.
  5. Click Confirm.


Configuration steps

After importing, you only need to perform one manual step:

  1. 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.
  2. 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 NameMeaningTrigger Point
view_item_listProduct ImpressionUser views a list of tours or activities.
select_itemProduct ClickUser clicks on a specific tour from the list.
view_itemProduct Detail ViewUser views the detailed description page of a tour.
add_to_cartAdd to CartUser adds a tour/ticket to their booking selection.
view_cartView CartUser reviews their selected items before checkout.
remove_from_cartRemove from CartUser removes an item from their selection.
begin_checkoutStart CheckoutUser clicks “Continue to Payment” after filling out contact info.
add_payment_infoPayment InfoUser enters payment details or selects a payment method.
purchaseConversionUser 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"
    }
  }
}
Was this article helpful?
Please Share Your Feedback
How Can We Improve This Article?
In This Article

Contact Support

Support Hours

NA: 9 am – 5 pm (GMT+7)
EU: 9 am – 6 pm (GMT)
Mon-Fri, Closed Holidays

Need Onboarding Help?

Talk to our customer success team about our onboarding services

API Documentation

API Documentation