Skip to content

Measure the badge in your analytics

Count the bookings that come through StayParity's book-direct badge in GA4: the stayparity=1 mark on Book direct, a segment on it, and what it never carries.

The badge's Book direct button can add stayparity=1 to the address of the hotel's booking page. Your analytics then sees which visits went through the badge, and you can count the bookings in those visits. StayParity sees none of it: the count is yours, in your own tool.

The mark

When the mark is on, Book direct opens the booking page with stayparity=1 in its address, for example:

https://book.example-hotel.com/search?checkin=2027-06-14&checkout=2027-06-15&adults=2&stayparity=1
  • It is the same for every guest. It carries no ID, no time, no night and no key, so it can't tell one guest from another.
  • It isn't a UTM tag. A UTM tag on a link inside your own site would replace the guest's real source in your analytics, such as the Google search or the newsletter they came from. stayparity=1 leaves the source alone.
  • It goes in the page's own query, before any #, so analytics reads it on a booking engine that routes with # too.
  • If the booking page you saved already has stayparity in its address, with any value, Book direct leaves the address exactly as you saved it.
  • It is left off on a page whose tag says data-consent="none" (see the badge's options).

StayParity switches the mark on for every badge at once, not hotel by hotel. While it is on, Book direct carries it on every hotel's site.

Before you start

  • Your GA4 tag has to run on the booking pages, where your booking engine takes the booking, not only on your website. If your engine is on another domain, it needs your GA4 measurement ID; ask your engine how to add it.
  • The engine has to send GA4 a purchase event, or another key event, when a booking is made. Without it, you can count the visits but not the bookings.
  • The engine has to keep stayparity=1 in the address of the page it opens. Click Book direct on your site and look at the address bar. If the mark is gone, the engine redirected without it: ask your engine to keep unknown query parameters.
  • Don't remove the parameter. If your site or tag manager strips query parameters it doesn't know before GA4 reads the address, add stayparity to the ones it keeps.

Check that GA4 sees it

  1. Click Book direct on your site.
  2. In GA4, open Reports → Realtime. Within a minute or two, the page view of the booking page appears.
  3. A day later, open Explore and start a Free form exploration. In Variables, click the + beside Dimensions, pick Page location and click Import, then double-click it to put it in Rows. Import Sessions the same way, beside Metrics, and double-click it to put it in Values.
  4. In Settings, under Filters, click Drop or select dimension or metric and pick Page location. Choose the match type contains, enter stayparity=1 and click Apply. The booking page with the mark is in the table.

Page location is the page's full address, its query included. The match is case sensitive, so type stayparity=1 in lower case.

Segment the visits

A filter keeps only the page views with the mark, not the booking a guest makes a few pages later. A session segment keeps the whole visit: every visit with a page whose address holds stayparity=1, and the bookings in it.

  1. In the same exploration, click the + beside Segments in Variables, and choose a session segment.
  2. Name it Badge: Book direct.
  3. Click Add new condition, pick Page location, choose contains and enter stayparity=1. Click Apply.
  4. Beside Metrics, import Ecommerce purchases and Purchase revenue, or Key events if your booking is a key event of its own, and double-click each to put it in Values.
  5. Remove the check's filter on Page location, and Page location from Rows.
  6. Drag the segment from Variables to Segment comparisons in Settings.

The table now shows the visits that went through Book direct and the bookings in them. Import Date beside Dimensions and double-click it to put it in Rows to see it over time.

Use Page location, not Landing page. The landing page is the first page of a visit, which is usually a page of your website, before the guest clicks Book direct. Only when the booking engine is on another domain and starts a visit of its own is the booking page the landing page.

Other analytics tools

Any tool that records the page's address works the same way: keep the visits with a page whose address contains stayparity=1, and count the bookings in them.

What the count is

  • It counts visits where the guest clicked Book direct. A guest who saw the badge, closed the tab and booked the next day comes in by another way, and isn't in it.
  • Ad and privacy blockers, and a guest who refuses your analytics cookies, keep a visit out of GA4 whatever its address.
  • StayParity never receives the count, the bookings or the visits. The badge's own figures, in the portal, count the page views that showed it, the clicks on Book direct, the exit offers shown, the codes copied, the nights kept and the times the dock opened by itself, not the bookings. What the badge counts lists what each count holds.

On this page