Skip to content
Faisal Mahmud TusherDigital marketing, SEO & analytics
with Faisal Tusher

Analytics › Intermediate

Designing an Event Tracking Plan for a Booking Flow

A hands-on exercise in turning a multi-step booking journey into a tracking plan: event names, typed parameters, data layer pushes timed to confirmed outcomes, a deliberate choice of key events and the checks that prove the data is right after release. The worked answer explains each decision so you can compare it with your own.
ExerciseIntermediate levelModule 1: Events, conversions and data quality5 minUpdated

Why this matters

A booking flow has every hard case at once: steps that look alike, a payment taken elsewhere, a confirmation page people reload, and a single-page application that never reloads. The tracking plan guide gives you the columns and the change control; the guide to events and parameters gives you the schema rules; the data layer guide gives you the contract with the developer. Here you apply all three to one journey.

The booking flow

Kestrel Car Hire is an invented regional rental firm with a handful of depots. Its booking flow runs inside a single-page application, so each step changes the address without a page load. The steps:

  • Search. The visitor picks a pickup depot, a return depot, dates and a driver age band.
  • Results. A list of vehicle classes with prices for the dates chosen.
  • Vehicle chosen. The visitor selects one vehicle class.
  • Extras. Insurance level, child seats and an additional driver.
  • Driver details. Name, licence and contact details, validated by the server.
  • Payment. A payment provider hosts the card form on its own domain, then returns the visitor.
  • Confirmation. The booking reference, on a page customers often reload.

Kestrel runs GA4 through Tag Manager (GTM) with enhanced measurement on, no data layer, and tags that scrape button text.

Illustrative example — not a real result

What Kestrel's current setup records for one week

SourceMeasureCount
Booking systemConfirmed bookings412
Analyticspurchase events538
AnalyticsSessions referred by the payment provider's domain371
AnalyticsDistinct event names containing "book"7
Analyticspage_view events per session in the booking flow, median1

The purchase count runs at about 1.31 times the booking count, so roughly 126 events a week are not bookings. The payment provider appears as a referral source, which splits each paying visitor into two sessions. A flow with seven steps records a single page view per session, so no step after the first can be reported.

Naming events and parameters

Apply the guides' conventions: recommended names where one fits; object then action, lower case with underscores, for custom events; one event with a parameter rather than one per variant; typed parameters with controlled values; person attributes as user properties; and every push fired when the outcome is true, not when it is attempted.

Task

Write your answer as a table before reading the worked answer.

  1. For each step of the flow, decide whether a recommended event fits or a custom event is needed, and name it.
  2. List each event's parameters with type and allowed values, and say which belong at item scope and which should be user properties.
  3. Write the trigger moment for each push: the condition that must be true first, and what must not fire it.
  4. Decide how the single-page application reports step views without double counting.
  5. Choose the key events and justify the ones you leave out.
  6. Write the data quality checks you will run after release, including the negative tests and the comparison with the booking system.

Worked answer

The plan, one row per event:

StepEventKey parametersTrigger moment
Searchvehicle_search (custom)pickup_depot, return_depot, same_depot (boolean), rental_days (integer), driver_age_bandResults returned by the server, not the search button click
Resultsview_item_listitem_list_name, items (one per vehicle class)Results rendered
Vehicle chosenselect_itemitem_list_name, itemsSelection accepted
Extrasbegin_checkoutvalue, currency, itemsExtras step loaded with the chosen vehicle
Extras confirmedextras_confirm (custom)insurance_level, child_seats (integer), additional_driver (boolean)Extras saved
Driver detailsdriver_details_submit (custom)account_statusServer validation passed
Paymentadd_payment_infopayment_type, value, currencyVisitor leaves for the provider with a valid basket
Confirmationpurchasetransaction_id, value, currency, coupon, itemsBooking confirmed by the server, once per reference

The search is custom because the recommended search event is built for typed search terms. Vehicle classes go in the items array, which keeps the recommended e-commerce reports working. account_status (guest or member) is better set as a user property than repeated on every event. Register the custom parameters you will report on before release.

The confirmed booking push, with the reset before it and every amount typed as a number:

Illustrative example — not a real result

The purchase push for one Kestrel booking

window.dataLayer.push({ ecommerce: null });
window.dataLayer.push({
  event: "purchase",
  ecommerce: {
    transaction_id: "KCH-58213",
    value: 214.60,
    currency: "GBP",
    items: [
      { item_id: "CLASS-C", item_name: "Compact estate", item_category: "vehicle", price: 189.60, quantity: 1 },
      { item_id: "EXTRA-INS-FULL", item_name: "Full cover", item_category: "extra", price: 25.00, quantity: 1 }
    ]
  }
});

The booking reference is the transaction_id, so a repeated push for the same booking can be spotted and removed. The vehicle and the cover are separate items, which lets reports show how often extras are sold.

For the application, the router pushes a view event on each step with the new path and title, and the automatic page views from history changes are switched off so that each step is counted once. The payment provider's domain goes on the referral exclusion list so that the return trip does not start a new session.

Key events: purchase only. The other steps are funnel stages; marking them as key events would feed ad platforms half-finished intent and blur the conversion rate (CVR) the business reports.

The checks after release:

  • Negative tests: reload the confirmation page, use the back button from it, and fail a card payment. None may fire purchase; the site stores the reference once confirmed and suppresses a repeat push.
  • Type check: value arrives as a number on every template.
  • Reconciliation: weekly ratio of purchase events to booking confirmations, within the plan's tolerance.
  • Referral check: the payment provider no longer appears as a source.
  • Event volume by day around the release date, and the container version matched to the plan version.
Illustrative example — not a real result

Reading the check after the fix

In the first full week after release the booking system records 398 confirmations and analytics records 392 purchase events, a ratio of about 0.98 against the plan's tolerance of 0.95 to 1.02. The small shortfall is consistent with visitors who declined consent. Sessions referred by the payment provider fall from 371 to 4, all from a test device later excluded, and the median booking session now records 6 step views.

Common mistakes

  • Firing purchase on the confirmation page view. Every reload becomes a booking: Kestrel's current overcount.
  • The step in the event name. booking_step_extras and its siblings defeat the recommended e-commerce reports.
  • History page views left on beside a router push. Steps after the first count twice.
  • Every step a key event. The bidding signal and the conversion rate stop meaning a booking.
  • Skipping the reconciliation. Without the booking system comparison, an inflated number survives.

Next, take the checkpoint on events, the data layer and data quality, and keep the data quality guide open for the weekly routine. The intermediate analytics level lists the module.

Pages this lesson applies

Terms used on this page

Also related

Related