How to Add Klaviyo Onsite Tracking to Your Booking Engine

Estimated 3 minute read

|

Updated Apr 1, 2026, 12:00 AM EST

Table of contents

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 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 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

0.9.png


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

2.png

For more instructions, follow the Cloudbeds guide.

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

3.png

For more instructions, follow the Mews guide.

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.

How to Add Klaviyo Onsite Tracking to Your Booking Engine - 图7

How to Add Klaviyo Onsite Tracking to Your Booking Engine - 图8

  1. Select Guesty Booking Engine.
  2. Click the triple dots next to your booking engine and select Edit Booking Engine.
  3. Scroll to the Web analytics section and paste your Container ID.

4.png

4.png

  1. Select Save Booking Engine.

For more instructions, follow the Guesty guide.


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

6.png

  1. Select the template and click Add to Workspace.
  2. 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).
  5. Select your PMS: Choose Mews, Cloudbeds, or Guesty from the dropdown menu.

How to Add Klaviyo Onsite Tracking to Your Booking Engine - 图13

How to Add Klaviyo Onsite Tracking to Your Booking Engine - 图14

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

How to Add Klaviyo Onsite Tracking to Your Booking Engine - 图15

How to Add Klaviyo Onsite Tracking to Your Booking Engine - 图16

  1. 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

10.png

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

How to Add Klaviyo Onsite Tracking to Your Booking Engine - 图19

How to Add Klaviyo Onsite Tracking to Your Booking Engine - 图20


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. 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 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 after selecting your PMS integration. Learn more about ways to use Klaviyo onsite tracking.

Was this article helpful?

YesNo

Use this form only for article feedback. Learn how to contact support.

Explore more from Klaviyo

Community

Connect with peers, partners, and Klaviyo experts to find inspiration, share insights, and get answers to all of your questions.

Visit Community

Partners

Hire a Klaviyo-certified expert to help you with a specific task, or for ongoing marketing management.

Hire a partner

Support

Access support through your account.

Email support (free trial and paid accounts) Available 24/7

Chat/virtual assistance Availability varies by location and plan type

Log in