Video Library

New Data Layer Makes it Easy to Add Reservation Data to Tracking Code

Make third-party tracking easier with our new unified reservationData layer. This update simplifies how ReservationKey integrates with tools like Sojern, Google Ads, and Meta Pixel by standardizing data and reducing manual customization.

Exposing Reservation Data for Tracking Code Integration

This guide explains how to expose reservation data from ReservationKey into your confirmation page so that it can be used by tracking systems such as Sojern, Google Analytics, or other marketing conversion platforms. This feature makes it easy to automatically include key reservation details in your tracking scripts for conversion tracking and performance reporting.

Overview

ReservationKey now provides a way to insert reservation details directly into the confirmation page through a JavaScript data layer. This allows you to pass key information—such as check-in dates, totals, or property details—to third-party tracking tools.

Example Use Case

For example, when using Sojern or Google Ads conversion tracking, you may need to include booking-specific variables like:

This new feature makes those data points easily accessible to your tracking script.

How It Works

On your reservation’s final confirmation page, ReservationKey automatically prints out a JavaScript object called reservation_data right before your tracking script. This object includes key booking values that you can use in any analytics or marketing tag.

In your page’s HTML source, you’ll see something like:

<script>
  var reservation_data = {
    checkin: "2025-10-14",
    checkout: "2025-10-16",
    total: 450.00,
    nights: 2,
    guests: 3,
    property: "Sunset Inn"
  };
</script>

Your tracking code can then reference these values directly. For example:

var RD = reservation_data;
Sojern_Tracker({
  checkin: RD.checkin,
  checkout: RD.checkout,
  total: RD.total
});

or simply:

reservation_data.checkin

Adding Your Tracking Code

To set up your tracking integration:

  1. Go to Settings ? Reservation Pages.
  2. Click the reservation page you want to modify.
  3. Navigate to the Settings 2 tab.
  4. Locate the Tracking Code field.
  5. Paste your third-party tracking script into that field.

The system automatically includes your reservation_data layer above the tracking code in the page’s <head> section, making it easy to access reservation variables from within any script.

Where the Data Appears

Your data layer and tracking code are added automatically to the final confirmation page (the page displayed after a successful booking). You can also include this same data under Website Messages ? Request Confirmation if you prefer to manage tracking from there, but using the tracking code field is usually cleaner and easier.

Customizing the Data Layer

The default data layer includes commonly used variables, but additional fields can be added upon request. If you find that you need access to other values (for example, promotional codes, rate plan names, or source tracking IDs), contact support and we can help expand the data set.

Summary

The ReservationKey data layer provides a simple and powerful way to expose reservation details to third-party analytics and advertising systems. By including a reservation_data JavaScript object on the confirmation page, tracking platforms like Sojern and Google Analytics can easily access key information such as check-in dates, amounts, and guest details—without manual editing of your HTML.

To implement, simply add your tracking code under Settings ? Reservation Pages ? Settings 2 ? Tracking Code. The data layer will automatically appear and be ready for use by any marketing or reporting script.