About Google Tag Manager:
Google Tag Manager (GTM) is a tag management system (TMS) that lets you easily update tracking codes and associated code fragments (commonly referred to as tags) on your website or mobile app. After adding Tag Manager's small code snippet to your project, you can securely and easily deploy configurations of analytics and measurement tags through a web-based interface.
(Source: https://support.google.com/tagmanager/answer/6102821?hl=de)
GTM is stored on Spider-Booking by default and if you connect your GTM account to it, you can connect any script or widget on your booking screen through this tool.
If you don't have a GTM account yet, you can create one here for free:
https://tagmanager.google.com/
GTM Integration on Spider-Booking
Once you have a GTM account, you can add the container ID to the Hotel-Spider extranet. The ID format is always GTM- followed by digits and characters. The ID is displayed in the top right side of the GTM extranet.
For example: GTM-KS1K35PT
Link GA4 with GTM
Once the hotel has entered the GTM ID in our extranet, the next sensible step is to integrate Google Analytics 4 tracking via the GTM.
If you don't have a Google Analytics 4 account yet, here are the instructions to create one:
https://support.google.com/analytics/answer/9304153?hl=de#property
1. Add new tag: you can use the tag type "Google Analytics: GA4 Configuration" here for easy tracking and then configure it.
2. Add new trigger: you can define whether GA tracking should be implemented on all pages or only on specific ones.
3. Once the changes have been published, the GA4 code will start providing data about visitor behavior on the booking screen via the GTM integration.
GTM Event Tracking
In order to provide you with as much detail as possible about customer behavior on Spider-Booking, we have predefined some events that are triggered automatically, and the event details can be passed to GA4 via GTM integration so that you can track them.
Standard E-commerce Events
We support a variety of standard GA4 events:
Event offer | Parameters that are communicated | |
search | Search parameters for availability. Whenever the search is started or adjusted, this event fires. | arrival, departure, numAdults, numChildren, numInfants, promoCode |
add_to_cart | Room/ product added to booking order | |
remove_from_cart | Room/product removed from the booking order | hotelId, productId |
view_item | the event fires as soon as the detailed view of the products is opened ":hotelId/room/:roomId" |
item_list_id, item_list_name, product id, product name |
view_item_list | Triggered on the home page with all rooms displayed to the user | |
purchase | Fired on the "thank you" page | currency, transaction_id, value, coupon, product Id, product name |
Special Events
In addition to standard events, we also support "special" events to enable even more precise tracking. This approach requires some configuration in GTM and GA4, so we recommend you work with an experienced professional for implementation here.
List of special events:
Event name | Event offer | Parameters that are communicated |
hotelId, productId | ||
hotelId, productId |
Example:
How can I track reservation revenue in GA4?
Here is a specific example of how the events listed above can be used to track sales and bookings via GTM in GA4.
1. Store the relevant "User-Defined Variables"
In order for the relevant parameters to also be communicated to GA4, they must first be stored as variables in GTM. Click on "Variables" and on "new". All parameters must be added as variables if you want to use them. Here is an example of the details for the variable of the reservation amount:
Parameter | Value |
Variable Type | Data Layer Variable |
Data Layer Variable Name | amount |
2. Tag definition in GTM
Define a new tag in GTM: Google Analytics: GA4 Event
Parameter | Value |
Configuration Tag | use the existing GA4 connection |
Event Name | = name of the event you want to track, for example "reservation" |
Event Parameters | You can freely define names. Select values from the list of data layer variables |
You can also use a URL utm:
utm_source
utm_medium
utm_campaign
3. Trigger Definition in GTM:
Define the trigger as a "Custom Event" in GTM
Parameter | Value |
Event name | reservation |
Fire Some Custom Events | Event = reservation |
In GA4, you should be able to see the variables under the dimensions after a maximum of 24 hours.
Debug View:
If you start a preview in GTM and open a debug session, you can also see the data live in GA4 when you log in
Comments
0 comments
Please sign in to leave a comment.