# 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="https://3848983471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8mHp6Xvui6hSl3fbco11%2Fuploads%2FjCwIco7qIVoW2vKGdYJw%2FGroup%20427318389.png?alt=media&#x26;token=15346dae-98d8-417b-97d0-9ee3539bd141" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3848983471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8mHp6Xvui6hSl3fbco11%2Fuploads%2F8h46CQMgN7k4o8WNfeWV%2FGroup%20427318390.png?alt=media&#x26;token=2dd10aba-268e-498a-99ee-4c9e649c09c6" 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="https://3848983471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8mHp6Xvui6hSl3fbco11%2Fuploads%2F5JmQk1bPOYlJNst7wZep%2FGroup%20427318391.png?alt=media&#x26;token=74b015d9-5ba7-443e-9007-5bbba25f4ead" 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="https://3848983471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8mHp6Xvui6hSl3fbco11%2Fuploads%2F26paZtACjj9vqARcaZqG%2FGroup%20427318392.png?alt=media&#x26;token=73f28860-9500-47ba-8dfd-2c1f149b93bb" 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="https://3848983471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8mHp6Xvui6hSl3fbco11%2Fuploads%2FPaICWHjBrEAhLxU71ZY3%2FGroup%20427318393.png?alt=media&#x26;token=01d7bd5a-ba73-4721-a26e-d2ff6d2d9f93" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3848983471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8mHp6Xvui6hSl3fbco11%2Fuploads%2F3iUIffQwS2bpduMJ1653%2FGroup%20427318388.png?alt=media&#x26;token=f498e1ff-d1dc-41a3-89f4-d34255b52499" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3848983471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8mHp6Xvui6hSl3fbco11%2Fuploads%2FpjqUx0IcLJDYffmrtDFI%2FGroup%20427318395.png?alt=media&#x26;token=df783a2e-910c-4599-9246-92bd8f2109e0" 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="https://3848983471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8mHp6Xvui6hSl3fbco11%2Fuploads%2FlEnEmJHDzXREhoL02xYQ%2FGroup%20427318394.png?alt=media&#x26;token=6d1252db-8d2b-4811-a799-8ce84dd096da" 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="https://3848983471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8mHp6Xvui6hSl3fbco11%2Fuploads%2FymggUXiZQositXScdeb3%2FGroup%20427318396.png?alt=media&#x26;token=45c0d889-cb2a-48e0-9818-c128acda9bdf" 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="https://3848983471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8mHp6Xvui6hSl3fbco11%2Fuploads%2FafwWOcte6faXzKvXWtu2%2Fimage%20866.png?alt=media&#x26;token=39176222-ae43-4a53-be0b-3ebf323c0089" alt="" width="563"><figcaption></figcaption></figure>

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

<figure><img src="https://3848983471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8mHp6Xvui6hSl3fbco11%2Fuploads%2FJHeK7xQALkT3hgr7123l%2FGroup%20427318397.png?alt=media&#x26;token=d8369a31-0285-4f75-9591-d3b9bda75e8f" 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="https://3848983471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8mHp6Xvui6hSl3fbco11%2Fuploads%2FPBgwD4cmlpRQakUlkEmL%2FGroup%20427318397.png?alt=media&#x26;token=d2040610-c0a2-4925-9564-a06ab0f105ce" 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>
