Skip to content
gilltrish.dev

After launch: getting found and measuring it · Part 2

The dashboard was the easy part: tracking travel plans for a CEO

Getting comfortable9 min read

The 30-second version

A dashboard is only as good as the data underneath it, so most of this project was tracking, not charts. Google Tag Manager notices what visitors do, GA4 stores it, and Data Studio turns it into pages a busy person can read. Start from the questions your reader actually has, give every chart a question as its title, and say plainly what the numbers can’t tell you.

On this page

A travel client had an AI tool review their website, and it came back with questions nobody could answer yet. How is demand for flights doing? How far ahead do people plan? Where are we turning people away? How many searches turn into bookings?

I’d tagged sites and set up tracking before, but this was my first dashboard. It turned into a bigger job than it sounded, because the data to answer those questions didn’t exist yet. I also absolutely loved it. Charts and tables are so cool, in the same way maps are (I built one of those too).

Part 1 of this series was about getting people to your site. This one is about the next question: once they’re there, what are they looking for?

The three tools

Explain it like I’m five

Tag Manager is the person at the door with a clipboard, writing down what each visitor asks for. GA4 is the filing cabinet the clipboard pages go into. Data Studio is the one-page summary on the CEO’s desk, made from what’s in the cabinet.

From a click to a chart

  1. Visitor searchesPicks a route and dates
  2. Tag ManagerNotices the search
  3. GA4Stores it
  4. Data StudioShows it to the CEO
  • Google Tag Manager (GTM) is a container of small scripts (“tags”) on the site that run when something happens (“triggers”). You can add tracking without editing the theme for every change.
  • GA4 (Google Analytics 4) stores events, like flight_search, with details about each one (“parameters”), like the route and date.
  • Data Studio (called Looker Studio until 2026) is Google’s free report builder. It reads from GA4 and turns it into charts.

Start with the questions, not the charts

Every page of the dashboard answers one of those four questions, and every chart title is a question too: “Which routes do people search for most?”, “How far ahead do people search?”

That also decided what had to be tracked. To answer “how far ahead?”, every search needs the date someone picked. To answer “where are we turning people away?”, it needs to know if that date was available.

Plain language only, too. The dashboard says “booking window”, not “lead time bucket”, and “homepage”, not “iframe”.

Step 1:Find every door

The brief was to track searches on the booking site. When I went looking, there were three different places a search could start:

  • The homepage: an embedded third-party booking system, shown in an iframe (a window into another website, inside the page).
  • A large collection of location-specific landing pages: the same embedded booking system, built right into the pages instead.
  • Multiple booking categories and services: a form from a custom WordPress plugin.

Tracking only the booking site would have caught one of the three. So there’s a single event, flight_search, sent from all three, with an entry_point parameter that says where it started. In the dashboard, that becomes “Where do searches start?”

Old tags don’t clean themselves up

The container still had tags sending data to Universal Analytics, which Google switched off in 2023 and deleted entirely in 2024. One of them fired three times on every page. There were also triggers waiting for event names the booking engine had stopped sending long ago. I paused them rather than deleting them, so there’s an easy way back if something depends on them.

Leave the money alone

The purchase tracking already worked, and the ads reporting depended on it. Nothing new touches it, and the new triggers specifically exclude the purchase event. After going live, the very first check was “does each booking still show up exactly once?”

“Someone clicked Search” sounds simple, until:

  • the embedded booking system pops up an “Important information” box and they hit Cancel,
  • the form has an error and nothing happens,
  • or they click Search twice.

So a search only counts when it actually goes ahead: Search with no pop-up, Search then Confirm, or our tour form passing its checks. Cancel and errors send nothing.

Here’s what each search carries (simplified, with made-up values):

  • search_route: Harbour → Cedar Island. Which routes?
  • depart_date: 2027-07-03. Which months and days?
  • days_ahead: 18. How far ahead?
  • lead_time_bucket: 08-30. The booking-window groups.
  • total_pax: 2. Party size, infants included.
  • date_available: true, false or unknown. Were they turned away?
  • entry_point: iframe, native or tour_form. Where did it start? (The dashboard turns these into “Homepage”, “Destination page” and “Services page”.)

“Was that date available?” (and why unknown is a feature)

This is the number behind “where are we turning people away?”, so it had to be right.

  • When someone picks a date on the booking system’s calendar, the tag reads how the calendar marked that day. A day marked as sold out is a clear false.
  • A day with no marking at all might mean there are no flights. It only counts as false when the tag is confident: the calendar actually loaded that month, other days that month are marked, and the schedule carries on past that date. Otherwise the date could just be past the published schedule.
  • Anything less certain is unknown.

Prefer “unknown” to a confident wrong answer

A wrong false would show up in the CEO’s report as lost demand. unknown gets its own “Couldn’t tell” slice, and the dashboard leaves it out of the unmet-demand numbers instead of guessing.

During testing, everything passed except the homepage. The tag inside the iframe said it had fired successfully, but nothing ever arrived in GA4. Not even a test event sent by hand.

The likely cause: browsers increasingly block tracking inside a cross-site iframe (a page from one company’s website shown inside another’s). That meant homepage searches had probably never been tracked, on the busiest page of the site.

Explain it like I’m five

The booking system is a room with no door to the office, only a window. So instead of walking its note to the filing cabinet, it passes the note through the window to the page around it, and the page files it.

That window is postMessage, the browser’s built-in way for an iframe and the page around it to talk. The iframe sends each step (search started, pop-up shown, confirmed, cancelled), and a small receiver tag on the main page sends the search to GA4 once it’s confirmed.

relay.js· JavaScript
// Inside the iframe: pass the search to the page around it
window.parent.postMessage(
  {type: 'search-confirmed', searchId, search},
  'https://www.example-travel.com', // only this page may read it
)

// On the main page: accept it only from the embedded booking system
window.addEventListener('message', (event) => {
  if (event.origin !== 'https://booking.example.com') return
  if (!isOneOfOurIframes(event.source)) return
  if (event.data?.type !== 'search-confirmed') return

  window.dataLayer.push({event: 'flight_search', ...cleanSearch(event.data.search)})
})

Anyone can post a message to your page

Check event.origin: check that the message came from your own iframe, and only copy the fields you expect, with the right type and a sensible length. The real receiver also sends each search only once, using a search ID, in case a message arrives twice.

We worked through it, and those were the first homepage searches ever to reach GA4. I’m really happy with that one.

Step 3:Set up GA4 before the data arrives

  • Register custom dimensions and metrics first. GA4 only shows a parameter in its reports once it’s registered, and it doesn’t go back and fill in older data. So this was done before the tracking went live.
  • Tell GA4 that both websites belong together. The search starts on the travel company’s site, and the booking finishes on the booking company’s site. Cross-domain measurement, plus a referral exclusion, stops the booking site from showing up as a “referral” in every report.

Step 4:Test like you don’t trust the tools

  • Every test search used a promo code starting with QA, so the dashboard can filter them out of the real data later.
  • DebugView sometimes skips events, and Tag Manager’s preview mode doesn’t follow the booking system embed when it jumps to the booking site. GA4’s Realtime counts were the tie-breaker: the total number of events, compared with the breakdown by entry point.

Don’t run scripted test searches on a booking engine

When we tried automating searches, the booking engine started acting flaky, probably because it took us for a bot. Real clicks, in a real browser.

Step 5:Build the dashboard (finally)

Five pages, one question each: Overview, Search demand, Booking window, Unmet demand and Search to booking.

I can’t show the real one, so here’s a mock-up of a single page with made-up data. Switch the date range to see the comparisons change.

Made-up data for a made-up travel company

Search demand

How is demand for flights doing?

Date range

How to read this page: a search is one click on Search. One person can search several times, so compare trends, not totals with passengers.

  • Flight searches

    4,917

    5.6% down vs previous period · worth a look

  • Flight bookings

    262

    4.4% up vs previous period · good

  • Searches per booking

    18.8

    9.2% down vs previous period · good

  • Searches for dates we couldn’t offer

    15.7%

    5.4% up vs previous period · worth a look

  • Average days booked ahead

    26 days

    No change vs previous period

  • Average party size

    2.3

    No change vs previous period

Which routes do people search for most?

  • Harbour → Cedar Island1,530
  • Harbour → Port Alder1,104
  • Harbour scenic loop702
  • Lakeside → Cedar Island688
  • Port Alder → Harbour512
  • Lakeside → Fern Bay381

Which requested dates had the most unmet demand?

Requested dateRouteAt least N unmet searchesDate unavailableDate not in results
Sat, Jul 3Harbour → Cedar Island≥ 585847
Sun, Jul 4Harbour → Cedar Island≥ 413341
Sat, Jun 26Harbour → Port Alder≥ 292925
Fri, Jul 2Harbour → Port Alder≥ 212117
Sat, Jul 10Lakeside → Cedar Island≥ 16916

One search can count in both columns, so the dashboard shows the higher of the two as a floor: the real number is somewhere between that and their sum.

Data is 1–2 days behind. Searches show interest, not passengers flown.

A mock-up with made-up data. The real report has five pages like this one.

What made it readable:

  • Chart titles are questions, like “Are searches and bookings going up or down?”
  • A small “How to read this page” box on every page, two or three sentences long.
  • The same footer everywhere: “Data is 1–2 days behind. Searches show interest, not passengers flown.”
  • Colours mean the same thing on every chart. Specific tours are always the same colour, and so is “Not available”.
  • Scorecards know which way is good. For “searches per booking”, going down is the good direction, so the scorecard is set up to show it that way.

What made it work:

  • The data source uses the owner’s credentials, so the CEO can view the report without their own GA4 access.
  • Report-level filters drop the staging and local sites and the QA test searches.
  • Blends (two queries joined together) wherever a chart compares two events, like searches vs bookings by day.

RegExp Contains vs RegExp Match

The filter that removes test sites uses a regex. In Data Studio, “RegExp Match” has to match the whole value, so a pattern like staging|\.local$ quietly excludes nothing. “RegExp Contains” is the one you want.

Be honest about what the numbers can’t say

The “About this data” box on the Overview page matters as much as any chart:

  • Searches aren’t passengers. One person can search ten times.
  • Searches and bookings are compared in totals, for the same dates, routes and campaigns, not person by person. The booking site often sees a different visitor ID, so “this search led to that booking” isn’t something this data can claim.
  • Unmet demand is shown as “at least N”. One search can trigger both signals (the date was unavailable, and the results skipped it), and GA4 can’t link the two, so adding them up would count some searches twice. The higher of the two is a floor, and the label says so.
  • Safari and iPhones limit cookies, so those visitors look “new” more often.
  • Very small numbers can be hidden by GA4 to protect privacy. It’s called thresholding.

What I’d tell past me

Ask “where else can this happen?” before building anything. Finding three entry points instead of one changed the whole plan.

We're planning to roll out similar dashboards for other clients, to help transform complex or overwhelming data into clear, actionable insights. By highlighting the questions that matter most to a business, these dashboards make it easier to understand performance, identify opportunities, and make informed decisions to plan for the future.

This is the other half of Part 1: SEO brings people in, and this is how you find out what they came for.