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 GA4Google's event-based analytics platform. through Tag Manager (GTMTag management system.) with enhanced measurement on, no data layer, and tags that scrape button text.
What Kestrel's current setup records for one week
| Source | Measure | Count |
|---|---|---|
| Booking system | Confirmed bookings | 412 |
| Analytics | purchase events | 538 |
| Analytics | Sessions referred by the payment provider's domain | 371 |
| Analytics | Distinct event names containing "book" | 7 |
| Analytics | page_view events per session in the booking flow, median | 1 |
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.
- For each step of the flow, decide whether a recommended event fits or a custom event is needed, and name it.
- List each event's parameters with type and allowed values, and say which belong at item scope and which should be user properties.
- Write the trigger moment for each push: the condition that must be true first, and what must not fire it.
- Decide how the single-page application reports step views without double counting.
- Choose the key events and justify the ones you leave out.
- 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:
| Step | Event | Key parameters | Trigger moment |
|---|---|---|---|
| Search | vehicle_search (custom) | pickup_depot, return_depot, same_depot (boolean), rental_days (integer), driver_age_band | Results returned by the server, not the search button click |
| Results | view_item_list | item_list_name, items (one per vehicle class) | Results rendered |
| Vehicle chosen | select_item | item_list_name, items | Selection accepted |
| Extras | begin_checkout | value, currency, items | Extras step loaded with the chosen vehicle |
| Extras confirmed | extras_confirm (custom) | insurance_level, child_seats (integer), additional_driver (boolean) | Extras saved |
| Driver details | driver_details_submit (custom) | account_status | Server validation passed |
| Payment | add_payment_info | payment_type, value, currency | Visitor leaves for the provider with a valid basket |
| Confirmation | purchase | transaction_id, value, currency, coupon, items | Booking 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:
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 (CVRShare of visits or clicks that convert.) 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:
valuearrives as a number on every template. - Reconciliation: weekly ratio of
purchaseevents 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.
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
purchaseon the confirmation page view. Every reload becomes a booking: Kestrel's current overcount. - The step in the event name.
booking_step_extrasand 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.
