Tracking: OpenTable widget, button or embedded booking page

  • Updated

Recording OpenTable bookings where OpenTable reports the booking back to your page.

The problem this solves

When a guest books a table through OpenTable, the booking happens on OpenTable's system, not your website. Distil needs to be told about it, and to record it against the visitor whose visit led to it.

How it works

When an OpenTable booking is completed, OpenTable sends a message to your page: the page the guest started on. Distil's tracking script listens for that message automatically, and records the booking under the visitor's own ID. You don't need to add a booking call: the basic install from the Quick start, plus the trigger condition in Setup below if it applies to you, is enough.

This works when OpenTable is opened in any of these ways:

How your site opens OpenTable What the guest sees
OpenTable's booking widget, in iframe mode (the widget code contains iframe=true) "Find a Table" opens OpenTable's booking form as a pop-up over your page
OpenTable's booking widget, in-page mode (the widget code contains iframe=false) "Find a Table" opens OpenTable in a new tab
A button whose code opens OpenTable with window.open(...) OpenTable opens in a new tab
OpenTable's full booking page shown inside your site, in an iframe The booking form is part of your page

In each case your page stays open while the guest books, so it can receive OpenTable's message.

Setup

With Google Tag Manager, this setup is available from Distil as a ready-made import file (see Installing with Google Tag Manager).

  1. Complete the basic install (Quick start). The tracking script's distil.load(...) line stays distil.load("YOUR_ACCOUNT_KEY");.
  2. Only if your Google Tag Manager container is connected to OpenTable's GTM integration (in OpenTable for Restaurants: Integrations → Social → Google Tag Manager): change each of the tracking script's triggers to fire on Some events, with the condition Page Hostname · does not contain · otstatic.com. Why the tracking script must stay off OpenTable's pages, below, explains why.

If you're not sure whether your container is connected, add the condition anyway: it has no effect on your own website's pages. Direct installs (without GTM) need nothing extra.

Why the tracking script must stay off OpenTable's pages

OpenTable has an optional Google Tag Manager integration. If it's switched on in OpenTable for Restaurants, OpenTable runs your GTM container inside its own booking pages, including the pop-up that opens over your page, in a hidden frame on otstatic.com.

Distil's tracking script mustn't run in that frame. If it did, it would create a second, anonymous visitor there, separate from the guest's real visit, and the booking could end up recorded against that visitor instead. The otstatic.com condition keeps the tracking script out of the frame, so bookings are recorded from your page, against the real visit.

If your site also has plain links to opentable.com (for example a "Trouble booking? Open OpenTable" link), bookings made through those links aren't recorded: OpenTable: links to opentable.com explains why. To record them, replace the links with the OpenTable widget, or a button that opens OpenTable with window.open(...).

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.

Still have questions?

Contact us