Experience the difference of "Elite".

Getting Started

Core Concepts

Overview

Bookings

Bookings & Quotes

Damage Protection

Data Management

Door Locks

Dynamic Pricing Integrations

Email Template Library

Guests

Hosted Websites

Listing Site Integration

Messaging

My Account

Other Integrations

OwnerRez API

Payment Processing

Privacy & Security

Properties

Property Management

Property Sharing

QuickBooks Integration

Quotes

Rates

Renter Agreements

Reporting

Reviews

Rules

Security Deposits

Suppressed Email Addresses

Taxes

Technical Stuff

Travel Insurance

Verified Email Domains

Widgets

WordPress Plugin

Channel Management

Payment Processing

Testing

Change Log

2022

2021

2020

2019

Widgets - Cross-Domain Analytics

If you've entered your Google Analytics or Facebook Tracking Pixel in your account settings, widgets will be tracked in addition to other events like quotes and bookings.

You can find more details on connecting Google Analytics and what is tracked in our Tracking guest interactions through Google Analytics and Facebook Pixel article.

Here's how to enable cross-domain tracking for pages that embed your widgets.  This allows you to connect the Google Analytics tracker on your surrounding page with the widget's Google Analytics user, and attribute bookings to specific channels according to how they landed on the website (e.g. Paid Google Ads, organic search, social, direct traffic, etc.).

To do that, you have to configure Google Analytics to "decorate" the widget URLs to pass the user across to our domain. Here's how to do that: 

1) Before the OwnerRez widget.js <script> tag on your page, turn off the default widget loading using the following javascript somewhere in your page's script:

window.OwnerRez = { skipLoadDefaultWidgets: true };

2) After Google Analytics is loaded on the page, call the OwnerRez.loadDefaultWidgets(tracker) function and pass in the Google Analytics tracker reference. If you're using the default tracking code, it will look something like this:

ga(function(tracker) {
  window.OwnerRez.loadDefaultWidgets(tracker);
});

window.setTimeout(window.OwnerRez.loadDefaultWidgets, 500);

That will first attempt to load the widgets with GA's cross domain tracking support. If that doesn't work, after 500ms it will load the widgets without tracking.

Here's a simple example page to demonstrate, using a GA ID of U-12345690-1 and an OwnerRez widget id of f895831f-a106-4f7f-ad6b-9ae3a382890f -- substitute those values with the values of your GA tracker and OwnerRez widget code...

<html>
<head>
<script>
// disable OwnerRez's automatic widget loading
window.OwnerRez = { skipLoadDefaultWidgets: true };

// standard GA script
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'U-12345690-1', 'auto', { 'allowLinker': true });
ga('send', 'pageview');
</script>
<script async src='//www.google-analytics.com/analytics.js'></script>
</head>
<body>
<h1>OwnerRez Cross Domain Widget Example</h1>
<!-- OwnerRez Booking/Inquiry widget -->
<div class="ownerrez-widget" data-widget-type="Booking/Inquiry" data-widgetId="f895831fa1064f7fad6b9ae3a382890f"></div>
<script src="https://secure.ownerreservations.com/widget.js"></script>
<script>
// use GA script to load the OwnerRez widgets while passing through the cross domain tracker
ga(function(tracker)
{
window.OwnerRez.loadDefaultWidgets(tracker);
});

// fall back to non GA after 500 ms if GA is blocked
window.setTimeout(window.OwnerRez.loadDefaultWidgets, 500);
</script>
</body>
</head>