# Set up Google Tag Manager tracking for online bookings

## Overview

Google Tag Manager helps you track online bookings so you can see which campaigns and channels are driving results.

Caspen lets you add your GTM container to your online booking experience, so your tracking can run as part of the booking process and send conversion data to tools like GA4, Google Ads, and Meta.

If your booking form is embedded on your website, your usual website tracking may not capture everything reliably. Adding GTM in Caspen helps ensure your tracking is recorded correctly.

{% hint style="warning" %}
**Important note**

To use Google Tag Manager with Caspen Online Bookings, you must contact Caspen Support. We will guide you through the activation process to enable it for your account.
{% endhint %}

***

## Step 1: Create or open your GTM container

1. Open Google Tag Manager.
2. Create a new Container (or use an existing one).

<figure><img src="/files/UqIGB6tBK9qzRTTRtmqc" alt=""><figcaption></figcaption></figure>

3. Enter a container name of your choice, then select **Web** as the target platform.

<figure><img src="/files/g7sUqHUKgMXqJskajBhS" alt="" width="563"><figcaption></figcaption></figure>

4. Click **Create** (top-right).
5. Your Google Tag Manager tracking ID can be found in the top right-hand corner of your Google Tag Manager account. Copy your Google Tag Manager ID (looks like `GTM-123ABCX`).

<figure><img src="/files/koEVgmoQaDeig1jsP4Ve" alt=""><figcaption></figcaption></figure>

***

## Step 2: Add the Google Tag Manager ID to Caspen bookings

1. In Caspen, open **Settings** → **Online Booking**.
2. Paste your **GTM Container ID** (it looks like `GTM-XXXXXXX`) into the Google Tag Manager ID field.

<figure><img src="/files/64Bt2dTKVDWyw0lYDvDK" alt="" width="563"><figcaption></figcaption></figure>

3. Click **Save** (top-right of the page).

***

## Step 3: Create the booking trigger in GTM

This trigger listens for a custom event sent by Caspen.

1. In Google Tag Manager, go to **Triggers** → click **New**.

<figure><img src="/files/HhMm1QEv9Jp4wxbLXhay" alt=""><figcaption></figcaption></figure>

2. Choose **Custom Event** as the trigger type.

<figure><img src="/files/VVXiq9Db7bXwcgJCRJVw" alt=""><figcaption></figcaption></figure>

3. Enter event name: `CaspenBookingCompleted`\
   \&#xNAN;*Note: Event names are case sensitive.*

<figure><img src="/files/pJiWgQ8FNsDQHI1DkZLp" alt=""><figcaption></figcaption></figure>

4. Choose when it should fire: All Custom Events.
5. Name the trigger (top-left, for example **CaspenBookingCompleted**).
6. **Save** (top-right).

<figure><img src="/files/cv56jXAvIax6jLL4J8KO" alt=""><figcaption></figcaption></figure>

***

## Step 4: Create your tracking tag and attach the trigger

You can either create one tag per platform, or combine multiple tracking scripts in one **Custom HTML** tag (simple for a first setup). In this guide, we will use one Custom HTML tag so the setup stays simple.

1. In Google Tag Manager, go to **Tags** → click **New**.

<figure><img src="/files/5gMdxUi4C9TFyjazITJG" alt="" width="563"><figcaption></figcaption></figure>

2. Enter a Tag name of your choice (top-left).
3. In Tag configuration select the tag type: Custom HTML.
4. Paste the tracking code you want to run. You can add more than one script if needed.

<figure><img src="/files/FUlR5TKuY54BOXw1OyfU" alt="" width="563"><figcaption></figcaption></figure>

5. In Triggering, select the trigger: `CaspenBookingCompleted`
6. Click **Save**.

<figure><img src="/files/DEU4VcSoyFxZQuOL0XaK" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
**Tip**

If you are not sure what code to paste for a specific platform, contact that provider (for example Google or Meta) and ask what you should add to the Custom HTML tag for tracking.
{% endhint %}

***

## Step 5: Publish your GTM changes

1. In Google Tag Manager, click **Submit**.

<figure><img src="/files/FyT7CkK85e6V6X1F5Ur1" alt="" width="563"><figcaption></figcaption></figure>

2. Add a version name, for example Caspen bookings tracking.
3. Click **Publish**. Once your changes are published, your tags are live and can start tracking bookings through Caspen.

***

## FAQs

<details>

<summary>How do I pass extra IDs or attribution details with the custom event?</summary>

This is configured in Google Tag Manager. If you need to pass additional IDs or attribution details through your tags, refer to Google Tag Manager guidance or contact Google Support for help setting up the right variables and tag configuration for your platform.

</details>

<details>

<summary>Do I need to set up Google Tag Manager on my website as well?</summary>

Setting up Google Tag Manager on your website is a separate task because your website code is managed outside Caspen. You would only set it up on your website if you also want to track website activity, such as which pages people view before they start a booking.

This guide does not cover installing Google Tag Manager on your website. If you need help with website setup, contact Google Tag Manager support or your website provider.

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.caspen.com/using-caspen/online-booking/set-up-google-tag-manager-tracking-for-online-bookings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
