Skip to content

Google Tag Manager

The Google Tag Manager integration is comparable to the Google Analytics integration. The Tag Manager tag is executed on every page and also tracks the corresponding events, including transactions and E-commerce events. The integration with the Google Tag Manager allows you to integrate 3rd party tags into your site and extend the marketing automation yourself.

Use Google Analytics without the Google Tag Manager

We recommend that you use our Google Analytics integration directly as it provides the safest integration with Google Analytics and is tested to perform as desired. Although Google might recommend using Tag Manager for Google Analytics, we recommend to use our direct integration. By using Google Analytics with Google Tag Manager you would have to map all the E-commerce events yourself within the Google Tag Manager.

Only use Google Tag Manager when you are absolutely sure

Using Google Tag Manager carelessly can crash your site, harm your customers data and degrade the commercial and technical performance of your site. We recommend only using Google Tag Manager if you are absolutely sure why and how you want to use it. If you have tracking data that is not currently integrated automatically, contact the support or your account manager to check if an automatic integration is possible.

Support events and variables

The Tag Manager integration supports a number of events and variables that are similar to those tracked by Google Analytics. You can handle these events in Google Tag Manager and associated your own tags with those. The following events show the JSON data that is pushed into the data layer of the configured Google Tag Manager container.

Availability search event

This event is raised when the user executed a search in the location search within the main search engine. The event is triggered whenever a search is executed, including subsequent searches or changes in the search parameters.

{
    "eventName": "availability",    /* name of the executed event */
    "dimension1": "Paris",          /* name of the location */
    "dimension2": "2022-05-05",     /* earliest arrival date */
    "dimension3": "2022-05-18",     /* latest return date */
    "dimension4": 7,                /* length of stay in days */
    "metric1": 4,                   /* occupancy */
    "metric2": 2,                   /* number of adults */
    "metric3": 2                    /* number of children */
}

View item list

The view_item_list event is a default E-commerce event and is raised as soon as items (aka products) are listed. In this case, the event is fired as soon as a list of accommodations, hotels, vacation rentals etc. are listed in the search event. This event is executed after the availability event is executed and includes all listed accommodations.

{
    "eventName": "view_item_list",
    "items": [
        {
            /* unique id of the property listed */
            "item_id": "bavaria-apartment-1",
            /* name of the property listed */
            "item_name": "Bavarian Rental Apartment",
            /* index of the property listed (SERP position) */
            "index": 0,
            /* name of the region the item is in */
            "item_list_name": "Oberbayern",
            /* type of the region the items is in */
            "item_list_id": "administrative_area_level_3",
            /* lowest price listed for this item */
            "price": 78.99,
            /* currency of the lowest price */
            "currency": "EUR",
            /* this is always just '1' */
            "quantity": 1
        },
        /* any subsequent items also listed in the results ... */
        {
            "item_id": "gasthof-am-berg",
            "item_name": "Gasthof am Berg",
            "index": 1,
            "item_list_name": "Oberbayern",
            "item_list_id": "administrative_area_level_3",
            "price": 129.50,
            "currency": "EUR",
            "quantity": 1
        }
        /* ... */
    ],
    /* name of the searched location */
    "item_list_name": "Oberbayern",
    /* type of the searched location */
    "item_list_id": "administrative_area_level_3"
}

View item

The view_item event is fired when the user visits a property page, the primary landing page for an accommodation. This is also often refered to as the accommodation page or the hotel page. It is the equivalent of a product page or product view on retail E-commerce sites.

{
    "eventName": "view_item",
    /* currency code viewed in */
    "currency": "USD",
    /* this will always only have 1 item */
    "items": [{
        /* unique id of the property */
        "item_id": "hotelCode_123456789",
        /* name of the property */
        "item_name": "The Watergate Hotel",
        /* lowest price of the property */
        "price": 259.99,
        /* same currency as above */
        "currency": "USD",
        /* this is aways '1' */
        "quantity": 1
    }],
    "value": 259.99
}

Currency changes

The currency_changed event is raised whenever the user changes the currency of the site.

{
    "eventName": "currency_changed",
    /* newly set currency code */
    "currency": "USD"
}

Checkout or booking form

The being_checkout event is a standard E-commerce event that is raised as soon as the user lands on the booking or reservation form that requires him or her to insert his or her personal details, address informatiton and, if configured, the payment information.

{
    "eventName": "being_checkout",
    /* currency of the booking */
    "currency": "USD",
    "items": [{
        /* unique id of the property */
        "item_id": "hotelCode_123456789",
        /* name of the property */
        "item_name": "The Watergate Hotel",
        /* total price of the booking */
        "price": 1768.46,
        /* currency of the booking */
        "currency": "USD",
        /* this is always '1' */
        "quantity": 1
    }],
    /* total price of the booking */
    "value": 1768.46
}

Purchase or booking

The purchase event is fired when the booking was confirmed and the user landed on the booking confirmation page. This event is not executed when the booking attempt failed for whatever reason like a connected system refusing the booking request.

{
    "eventName": "purchase",
    /* currency the booking was made in */
    "currency": "USD",
    "items": [{
        /* the unique record locator or reservation id */
        "transaction_id": "7NmEQUXAOgJEQ2Kqd8yK1w",
        /* the unique code of the property */
        "item_id": "hotelCode_123456789",
        /* the name of the property */
        "item_name": "The Watergate Hotel",
        /* the total tax amount included */
        "tax": 159.32,
        /* the total price (incl. taxes) */
        "price": 1768.46,
        /* same currency as above */
        "currency": "USD",
        /* this is always '1' */
        "quantity": 1
    }],
    /* same total price amount as above */
    "value": 1768.46
}

Refund or cancellation

The refund event is identical to the purchase event, but executed when the booking is cancelled by the end-user through the booking confirmation page. The booking confirmation page can alse be reached by the end-user through the booking confirmation email. It is essential a reversal of the purchase event.

{
    "eventName": "refund",
    /* currency the booking was made in */
    "currency": "USD",
    "items": [{
        /* the unique record locator or reservation id */
        "transaction_id": "7NmEQUXAOgJEQ2Kqd8yK1w",
        /* the unique code of the property */
        "item_id": "hotelCode_123456789",
        /* the name of the property */
        "item_name": "The Watergate Hotel",
        /* the total tax amount included */
        "tax": 159.32,
        /* the total price (incl. taxes) */
        "price": 1768.46,
        /* same currency as above */
        "currency": "USD",
        /* this is always '1' */
        "quantity": 1
    }],
    "value": 1768.46
}

Google Tag Manager provides powerful extensions

You can add whatever code you wish with the Google Tag Manager. Especially marketing software such as E-mail campaign managers and many others already provide a Google Tag Manager integration and can thus be integrated as well. You need to be extremely careful and carefully test your integration. We recommend you set up a test-domain in your account before your add these tags to your production environment