---
title: "How to Add Klaviyo Onsite Tracking to Your Booking Engine"
description: "This guide will walk you through integrating Google Tag Manager (GTM) with your Property Management System (Mews, Cloudbeds, or Guesty) using the Klaviyo Hotels Tag."
canonical_url: "https://help.klaviyo.com/hc/en-us/articles/46643094275099"
markdown_url: "https://help.klaviyo.com/hc/en-us/articles/46643094275099.md"
locale: "en-us"
category: "Integrations"
section: "General"
updated: "2026-10-29"
---

# How to Add Klaviyo Onsite Tracking to Your Booking Engine

This guide will walk you through integrating **Google Tag Manager (GTM)** with your Property Management System (Mews, Cloudbeds, or Guesty) using the **Klaviyo Hotels Tag**.

By the end of this setup, you’ll be able to track key website visitor behaviors like **Active on Site,** **Viewed Listing,** and **Started Checkout** directly in your Klaviyo account. This will allow you to easily set up revenue-driving automations, such as Browse Abandonment and Abandoned Cart flows, and create highly-targeted segments.

**Before you begin, if you don't already have a Google Tag Manager account, please follow Google's** [**guide**](https://support.google.com/tagmanager/answer/14842164?hl=en) **on how to set one up.**

---

## Step 1: Locate your GTM container ID

Before you begin, you need to identify the specific container you want to use.

1. Log into your [Google Tag Manager](https://tagmanager.google.com/) account.

2. Select the **Container** associated with your hotel’s website.

3. At the top of the window, next to the "Submit" and "Preview" buttons, you will see your **Container ID** (it looks like `GTM-XXXXXXX`).

4. **Copy this ID** to your clipboard.



![0.9.png](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/55081a086efb5b90ee126b2e60b84072042bc430-2599x1323.png?auto=format)

---

## Step 2: Connect GTM to your property management system (PMS)

You need to tell your booking engine to "listen" to your GTM container. Follow the steps for your specific platform below:

### For Cloudbeds

1. Log into Cloudbeds.

2. Click on the **Account Icon** > **Settings > Booking Engine**.

3. Select the **Analytics** tab**.**

4. Paste your **Container ID** into the GTM field and save.



![2.png](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/8c83e260f79ad5096152f626b925cdec34d86629-2602x1487.png?auto=format)

For more instructions, follow the [Cloudbeds guide](https://myfrontdesk.cloudbeds.com/hc/en-us/articles/25825202111387-Connect-Google-Analytics-with-Cloudbeds-Booking-Engine).

### For Mews

1. Log in to Mews.

2. Go to **Settings > Services**.

3. Select a Bookable service. 

4. Click on **Booking engines**. 

5. Select the booking engine that you want to track with Google Tag Manager. 

6. Under **Google tag manager ID**, paste your **Container ID.**

7. Click **Save**.



![3.png](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/dd52f4a30d309817b74215e6cf8c652740c3d40f-2591x1353.png?auto=format)

For more instructions, follow the [Mews guide](https://help.mews.com/s/article/google-tag-manager).

### For Guesty

To install the code on your site:

1. Log in to Guesty.

2. Select the **Operations** dropdown at the top, then select **Growth > Distribution**.



![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/a9c808814bfe6738908a74a3ccc3444ef8ddd75e-972x558.png?auto=format)

3. Select **Guesty Booking Engine**.

4. Click the triple dots next to your booking engine and select **Edit Booking Engine**.

5. Scroll to the **Web analytics** section and paste your **Container ID**.



![4.png](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/a81b8c3ef2bfba7577aa9fff6ec01db69e305bdf-3014x1524.png?auto=format)

6. Select **Save Booking Engine.**



For more instructions, follow the [Guesty guide](https://help.guesty.com/hc/en-gb/articles/16714065345821-Using-analytics-tools-in-your-Guesty-Booking-Engine).

---

## Step 3: Add the Klaviyo Hotels Tag template in GTM

Now that GTM is connected to your PMS, you need to add the Klaviyo-specific tracking logic.

1. Back in Google Tag Manager, click **Templates** on the left-hand sidebar.

2. In the **Tag Templates** section, click **Search Gallery**.

3. Search for **"Klaviyo Hotels Tag"**.



![6.png](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/9e6e2457c931f3b9eb810d81b5d8907e1cc1fc98-2603x1363.png?auto=format)

4. Select the template and click **Add to Workspace**.

5. Confirm by clicking **Add** again.



---

## Step 4: Create and configure your tag

This step connects the template to your specific Klaviyo account.

1. Go to **Tags** on the left sidebar and click **New**.

2. **Name your tag** (e.g., `Klaviyo Hotels Tracking`).

3. Click **Tag Configuration** and select the **Klaviyo Hotels Tag** you just added.

4. **Enter your Klaviyo Public API Key:** This is the 6-character identifier found in your Klaviyo Account Settings (see our [guide to finding your public key](https://help.klaviyo.com/hc/en-us/articles/115005062267.md)).

5. **Select your PMS:** Choose Mews, Cloudbeds, or Guesty from the dropdown menu.



![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/2a60033e663a85b39d998061d3b28d709583a465-2604x1364.png?auto=format)

6. **Set the Trigger:** Hover over the **Triggering** section. Click on the pencil that appears in the top right corner. Select **All Pages**.



![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/50aa74a47022869a2e39601e8f351e822eccb48b-2609x1363.png?auto=format)

7. Click **Save**.



---

## Step 5: Publish your changes

Your tracking will not go live until you submit these changes.

1. Click the blue **Submit** button in the top right corner of GTM.



![10.png](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/5d2346c38312bb643f60fe338b2ed23b9e8cc3d8-2599x1355.png?auto=format)

2. Give your version a name (e.g., `Added Klaviyo Hotels Tracking`).

3. Click **Publish**.



![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/757f1ffc28ff215a8924be67b8d4f87eba38e3a8-2608x1355.png?auto=format)

---

## What happens next?

Once published, the tag will automatically start sending event data to Klaviyo for identified visitors on your booking engine. [Learn who Klaviyo can track](https://help.klaviyo.com/hc/en-us/articles/115005076767.md#h_01HADAYAACVVC4BXQ0ES5Y50TC). Check for the following events:

- **Active on Site:** Fires when someone is active on the website.

- **Viewed Listing:** Fires when a traveler looks at a specific room or property.

- **Started Checkout:** Fires when a traveler enters the booking flow.



To verify tracking:

1. Open your booking engine and follow the [onsite tracking test instructions](https://help.klaviyo.com/hc/en-us/articles/115005076767.md#h_01HADAYAACFYSN7F22XPPCGT6B) to identify your test browser.

2. View a room or property and begin checkout.

3. In Klaviyo, go to **Analytics > Metrics**. Select **Active on Site**, **Viewed Listing**, or **Started Checkout**, then open **Activity feed** to look for recent events from your test visit.



Use the browse abandonment and abandoned cart templates in the [flow library](https://www.klaviyo.com/flows/create) after selecting your PMS integration. Learn more about [ways to use Klaviyo onsite tracking](https://help.klaviyo.com/hc/en-us/articles/115005076767.md).
