> ## Documentation Index
> Fetch the complete documentation index at: https://directdoc.hotellinkage.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Tag Manager Integration

> Complete guide for integrating Google Tag Manager with Linkage Direct booking engine

## Introduction

Linkage Direct provides comprehensive Google Tag Manager (GTM) integration to track user interactions throughout the booking process. This integration enables you to monitor conversions, analyze user behavior, and optimize your marketing efforts.

## Integration Overview

The GTM integration tracks three main booking steps with detailed event data:

<CardGroup cols={3}>
  <Card title="Room Selection" icon="bed" href="/gtm-integration/room-selection">
    Track availability searches and room selection events
  </Card>

  <Card title="Client Form" icon="user" href="/gtm-integration/client-form">
    Monitor booking form interactions and extras selection
  </Card>

  <Card title="Confirmation" icon="check" href="/gtm-integration/confirmation">
    Capture reservation completions and cancellations
  </Card>
</CardGroup>

## Key Features

* **Real-time Event Tracking**: Capture user interactions as they happen
* **Comprehensive Data Layer**: Access detailed booking information
* **E-commerce Ready**: Full support for enhanced e-commerce tracking
* **Device Detection**: Separate tracking for desktop/tablet and mobile users
* **Multi-language Support**: Track bookings across all supported languages

## Events Structure

Each booking step triggers specific events that push data to the GTM data layer:

| Booking Step               | Event Names                                          | Purpose                                       |
| -------------------------- | ---------------------------------------------------- | --------------------------------------------- |
| **Step 1: Room Selection** | `init`, `mirai.availability`, `mirai.noAvailability` | Track search queries and availability results |
| **Step 2: Client Form**    | `init`                                               | Capture selected rooms and customer details   |
| **Step 3: Confirmation**   | `init`, `mirai.cancellation`                         | Record completed bookings and cancellations   |

<Note>
  Event names containing "mirai" (like `mirai.availability`) are part of the technical implementation and should not be modified in your GTM configuration.
</Note>

## Data Layer Structure

All events push structured data to the Google Tag Manager data layer, including:

* **Hotel Information**: Hotel ID, chain ID, hotel name
* **Booking Details**: Check-in/out dates, number of nights, occupancy
* **Pricing Data**: Room rates, taxes, extras, total amounts
* **User Context**: Device type, language, country (via IP)
* **Reservation Data**: Confirmation codes, customer information

## Implementation Guide

Choose your tracking method based on your needs:

<Tabs>
  <Tab title="Option 1: Google Analytics Only (Recommended)">
    ### Simple Setup for GA4 Tracking

    Perfect if you only need Google Analytics tracking. All events in this documentation will be automatically tracked.

    <Steps>
      <Step title="Access GA4 Admin">
        Go to your Google Analytics 4 property → Admin → Account → Access Management
      </Step>

      <Step title="Add Hotel Linkage User">
        Add user: `designhotelsearch@gmail.com` with Administrator permissions
      </Step>

      <Step title="Confirm Access">
        Save changes and notify Hotel Linkage support
      </Step>
    </Steps>

    **That's it!** All events will be automatically tracked via Gtag without any additional setup.
  </Tab>

  <Tab title="Option 2: Multi-Platform Tracking (Advanced)">
    ### GTM Setup for Advanced Tracking

    Required if you need:

    * Facebook Pixel tracking
    * Bing Ads conversion tracking
    * LinkedIn Insight Tag
    * Custom remarketing tags
    * Any third-party marketing tools

    <Steps>
      <Step title="Create GTM Account">
        Go to [tagmanager.google.com](https://tagmanager.google.com) and create a container
        Get your GTM ID (format: GTM-XXXXXXX)
      </Step>

      <Step title="Grant Permissions">
        In GTM → Admin → User Management:

        * **Account Permissions**: Add `designhotelsearch@gmail.com` as User
        * **Container Permissions**: Grant Publish access to same email
      </Step>

      <Step title="Share GTM ID">
        Send your GTM-XXXXXXX ID to Hotel Linkage support
      </Step>

      <Step title="Configure Tags">
        Create triggers and tags in GTM using the events documented in this guide
      </Step>
    </Steps>
  </Tab>
</Tabs>

<Warning>
  **Important**: You must grant the correct permissions to `designhotelsearch@gmail.com` for the integration to work. Double-check the email address to avoid delays.
</Warning>

## Implementation Requirements

<AccordionGroup>
  <Accordion title="Technical Prerequisites">
    * Google Analytics 4 account (for Option 1)
    * Google Tag Manager account (for Option 2)
    * Admin access to grant permissions
  </Accordion>

  <Accordion title="Supported Platforms">
    * Google Analytics 4 (GA4)
    * Google Ads Conversion Tracking
    * Facebook Pixel
    * Bing Ads
    * LinkedIn Insight Tag
    * Custom HTML/JavaScript tags
  </Accordion>
</AccordionGroup>

<Info>
  **Automatic Activation**: The data layer events are automatically activated during the hotel onboarding process. Once you grant the necessary permissions, all events documented here will start firing immediately without any additional configuration required from your side.
</Info>

## Support

For assistance with GTM integration:

* Contact Hotel Linkage support at [support@hotellinkage.com](mailto:support@hotellinkage.com)
* Visit our [Premium Support portal](https://supermarket.hotellinkage.net/premiumsupport) for custom implementation requests
