Skip to main content

GA4 measurement settings for the online booking system, in case of iFrame embedding

Help for setting up Google Analytics 4 measurements when integrating the online booking surface with iFrame

Zsuzsa Szilágyi avatar
Written by Zsuzsa Szilágyi
Updated over 2 months ago

We make it a priority to ensure that our customers always have access to the latest and best measurement technologies. Although our existing metering will work without an upgrade, it is worth reviewing our metering settings from time to time to ensure that our accommodation is using the latest technologies. Our v2 update includes settings for the new technologies Google Consent Mode v2, Google Enhanced Conversions, Meta Advanced Matching and Conversions API.

We believe it's important for our customers to see the behaviour of their visitors and the effectiveness of their marketing campaigns not only on their websites, but also on RESnWEB surfaces, which is why we have hired analytics experts to help us prepare our systems for Google Analytics measurements.

For the settings required on the accommodation side, we have received the following help file from DataCrew, which guides you through the steps of the setup.

It's important to know that we develop the online booking system, Google Tag Manager and measurement settings are not our area of expertise, so if you have any questions, you can contact your own analytics colleague or analytics experts. We do provide the ability to measure bookings and gift voucher purchases on our interfaces, but the experts will be able to help you with the settings.

Our analytical expert partner

Péter Juhász - Nagy

Consent Mode

Without a properly configured consent solution (e.g. CookieYes) and consent mode on the side of the accommodation, please do not proceed further, as the operation of the measurements may be compromised. RESnWEB recommends the use of CookieYes and we will help you to easily set up this system. You can request the use of CookieYes from CM Design, who are also resellers of CookieYes in Hungary. If you are unsure, please contact your analytics colleague or an analytics expert instead.

IMPORTANT! The following settings are only used to link RESnWEB to the website for analytical measurement. It is assumed that the basic GA4 settings are already configured on the websites.

Data structure

After the correct settings (detailed below), the following events will be added to Google Analytics:

Page view event

  • page_view - all page views

Ecommerce events

  • view_item_list - display room, voucher, extra service list

  • view_item - room, voucher, extra service display

  • add_to_cart - add room, voucher, extra service to cart

  • begin_checkout - personal data page for booking / delivery page for gift voucher purchase

  • add_payment_info - when choosing a payment method

    Parameter:

    payment_type - selected payment method

  • purchase - successful purchase (booking)

    As a help, a concrete purchase event datalayer push is shown below:

Parameters

The following parameters are sent to Analytics:

  • [item_name] - Package, upsell product or gift voucher name

  • [item_id] - Package, upsell product or gift voucher ID

  • [item_brand] - Accommodation name

  • [item_category] - Type of room or gift voucher

  • [currency] - Currency

  • [quantity] - Quantity

  • [price] - Price

  • [item_variant] - Given room/all rooms | given gift voucher/all gift vouchers

  • [guest] - Number of guests in the given room

  • [adults] - Number of adults in the given room

  • [children] - Number of children in the given room

  • [children_years] - Age of children in the given room

  • [arrival] - Date of arrival

  • [departure] - Date of departure

  • [arrival_week] - Number of weeks of arrival in the year

  • [nights] - Number of nights

Other events

  • exit_popup_shown - Display exit popup

  • search_saved - Sign up in the exit popup
    Parameter:

    offers - If the visitor subscribes to the newsletter, then true, otherwise false

  • redeem_voucher - Redeem gift voucher
    Parameter:

    code - Gift voucher code entered

  • newsletter_signup - Successful newsletter subscription

  • quotation_success - Submit of request for proposal
    Parameters:
    arrival - Planned arrival date

    departure - Planned departure date

    arrival_week - Number of weeks of arrival in the year

    nights - Number of nights

    rooms - Number of rooms

1. GOOGLE ANALYTICS SETTINGS

Custom dimension

To manage the custom dimensions sent from RESnWEB to Goole Analytics 4, a minor configuration is required:

In the Admin menu of the Google Analytics 4 property of the accommodation, select Custom definitions:

Here we can add custom dimensions by clicking on the Create Custom dimensions button:

It is important that Event Scope is selected for the following parameters:

  • offers

  • code

  • arrival

  • departure

  • arrival_week

  • nights

  • rooms

It is important that Item Scope is selected for the following parameters:

  • guest

  • adults

  • children

  • children_years

  • arrival

  • departure

  • arrival_week

  • nights​

2. GOOGLE TAG MANAGER SETTINGS

Get Measurement ID

In order to set up the GTM, we first need the measurement ID for the Google Analytics 4 property of the accommodation. This can be obtained from the Google Analytics Admin interface.

In the Analytics Admin interface, in the Property column, select Data Streams and here select the Web type (not named) stream:

You will need the Measurement ID found here, which can be copied with 1 click:

GTM container settings

By clicking on the button below you can download the template container to be imported into the existing (website) container of the accommodation. Import the file in the compressed (.zip) file (rnw_ga4_main_frame_v2_2.json) into the container.

To import, select the Import Container in the GTM Admin interface and add it to our container using the Merge function.

File version: if-mf-202410281507-v7

For security reasons it is strongly recommended to work in a new workspace and to select the Rename conflicting tags, triggers and variables option.

If you have already imported a RESnWEB .json file before 19 June 2024, you still need to select the Import Container, but you need to add it to your container using Merge => Overwrite conflicting tags, triggers and variables.

Next, find the Const - GA4 Measurement ID variable in Variables and enter the Measurement ID of your property:

Once you're done, you can arm the storage by pressing the Submit button in the top right corner.

3. INSERT COOKIEYES (optional)

It is important to have a Cookie Banner solution integrated into the website (RESnWEB recommends CookeYes, but Cookiebot and OneTrust are also supported), without it the measurements will not work well. Therefore you need to either integrate CookieYes natively / with a Wordpress plugin or from GTM into the site. After CookieYes registration (Hungarian reseller is CM Design), the CookieYes Website Key (ID) you receive must be entered into GTM.

If your property has already successfully integrated CookieYes into the site natively, or via a Wordpress plugin or GTM, there is nothing more you need to do.

If you do not have CookieYes on your site and you want to insert it from GTM, you will need to enter the CookieYes Website Key (ID) you received after registering CookieYes in GTM.

Find the variable Const - Cookieyes Website Key in Variables and enter the Cookieyes ID of your website:

Then we activate the imported Cookieyes tag by removing the pause:

4. SETTING UP RESnWEB

After the above, you only need to enter the analytical identifiers in the RESnWEB admin interface under Hotel information / For web developers:

Here you should now only add the identifiers with the Google Analytics 4 option (the other options are still present for backwards compatibility). The Measurement ID can be retrieved from the GA4 admin interface as already described above.

The Measurement Protocol API secret key can be generated by selecting the menu and pressing the Create button:

After entering the analytical identifiers in the RESnWEB interface, save the changes.

IMPORTANT! For Google Analytics 4 settings, it is essential to have a unique subdomain setting. Without this, Google Analytics will not be able to accurately link conversions (bookings / request for proposal / gift voucher purchases) to the correct source. The subdomain setting will show transactions related to Google Ads and social media campaigns. For more information on the details of subdomain setup and how to set it up, please see our help.

Did this answer your question?