Tracking: Reference

  • Updated

Load options, event fields, value formats and the terms used in this handbook.

Load options

The distil.load(...) line of the tracking script can take options:

Option Use it when What it does
(none) Most sites Records page views, and OpenTable bookings reported back to your page
trackOpenTable: true OpenTable: links to opentable.com Adds the visitor's ID to links to OpenTable when clicked
trackDataLayer: true The tag inside OpenTable's frame Records bookings from OpenTable's GTM events
trackSevenRooms: true SevenRooms bookings Adds the visitor's ID to links to SevenRooms when clicked

Combine options in one object, for example { trackOpenTable: true, trackSevenRooms: true }.

What every event carries

You don't send these: the tracker adds them to every event. They're what you'll see in the Context part of a request to tf.distil.ai while testing.

Field What it is
DistilAccountId Your account key
AnonymousUserID The visitor ID
PageUrl The page the visitor is on. On the first event of a visit, this can be the landing page the starter script noted, if the tracking script only started later (for example after consent).
PageTitle The title of the page the visitor is on
ReferrerUrl The page they came from
FirstPageUrl, FirstReferrerUrl The landing page and original referrer, noted by the starter script
EventTimestampUTC, EventTimestampLocal When it happened, in UTC and in the visitor's time zone
IpAddress The visitor's IP address
Device Information The browser's user agent
TrackerVersion The tracker version that sent it

Value formats

For values you send in your own calls, unless a section of this handbook says otherwise:

Type How to write it Example
Text In quotes, with no line breaks "Title": "Summer menu"
Number No quotes "partySize": 4
True/false No quotes "MarketingSubscribed": true

Glossary

Term Meaning
Account key Identifies your Distil account. Every event carries it.
Visitor ID An anonymous ID Distil stores in each visitor's browser, so their visits and bookings can be linked.
Starter script The small script that notes where a visitor came from, before consent.
Tracking script The loader that starts Distil's tracker.
GTM container Your Google Tag Manager setup, identified by GTM-XXXXXXX.
DOM Ready The GTM moment when the page's HTML has loaded.
otstatic.com The domain OpenTable uses for the frame that runs restaurants' GTM containers on its booking pages.
RID OpenTable's restaurant ID.
Reference code SevenRooms' identifier for a booking.
daid / dref Added to a link to OpenTable or SevenRooms when it's clicked: the visitor ID (daid) and the page they clicked it on (dref), so a booking on the other site is linked to the visit.
Frame (iframe) A web page shown inside another page, for example OpenTable's booking form inside your site, or OpenTable's hidden frame that runs your GTM container.
dataLayer The list GTM reads events from. Your site, or a booking system, adds events to it, and GTM tags react to them.
Google consent mode Google's standard way for a cookie banner to tell GTM what the visitor agreed to. analytics_storage is its setting for analytics cookies.
Page Hostname A built-in GTM variable: the website address of the current page, without https:// or the path (for example www.example.com).

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.

Still have questions?

Contact us