Blog ·
How to Track Bali Villa Booking Conversions: GA4 and GTM Guide for Direct Bookings
How to Track Bali Villa Booking Conversions: GA4 and GTM Guide for Direct Bookings
Many villa owners in Bali know exactly how many bookings come through OTAs, but are nearly blind to what happens on their own website. Yet, that is where the real margin lies. The correct way of tracking Bali villa booking conversions is the foundation for shifting guests from high-commission OTAs to direct bookings.
Without tracking that connects ad clicks to booking confirmations, every rupiah of your Google Ads budget is a guess. You don't know which campaigns generate guests and which are simply burning through your budget.
This article explains how to properly set up booking conversion tracking — from Google Tag Manager, dataLayer, and Google Analytics 4, all the way to connecting it to Google Ads.
Why conversion tracking is the foundation of direct bookings
You cannot grow what you do not measure. For villas and hotels in Bali, conversion tracking answers three concrete business questions:
- How much does it cost to get one direct booking? — Cost per acquisition (CPA) for each channel.
- At which step is your funnel leaking? — How many guests start a booking but don't finish? On which page do they leave?
- What percentage of revenue has shifted away from OTAs? — With proper tracking, you can compare OTA vs direct bookings in real monetary value, not just estimates.
Without answers to these three questions, you cannot make accurate decisions regarding your budget, pricing, or channel strategy.
Tracking architecture: GTM → dataLayer → GA4 → Google Ads
Booking conversion tracking is not a single tool. It is a sequence of four components that must work together:
- Google Tag Manager (GTM): The place where all tags and triggers are managed. GTM acts as a "distribution panel" — once installed on the website, marketing teams can add or modify tracking without a developer.
- dataLayer: A JavaScript array that bridges the website/booking engine with GTM. Every important action (booking click, begin checkout, payment completed) is pushed to the dataLayer as an event.
- Google Analytics 4 (GA4): Receives events from the dataLayer via GTM, records them as conversions, and reports where the guests came from.
- Google Ads Conversion Tracking: Receives conversion data from GA4 so that campaigns can be optimized based on real bookings, not just clicks.
The result is a closed loop: booking engine → dataLayer → GTM → GA4 → Google Ads.
This is the difference between "having GA4 installed" and "actually measuring bookings." Without this loop, your GA4 only records pageviews — not transactions.
Step 1: Map out your booking funnel
Before touching any code, first map out the steps guests go through from arriving at the website until the booking is completed:
- Landing — The guest arrives at the homepage or landing page.
- View room — The guest views the room or villa page.
- Start booking — The guest clicks "Book Now" or selects dates.
- Checkout — The guest fills out their details and enters the payment page.
- Confirmation — The booking is completed, and the confirmation page appears.
Each of these steps will become an event in the dataLayer. A clear funnel makes debugging easier — if there is a step that fails to send an event, you know exactly where the problem lies.
Step 2: Send events via dataLayer
The dataLayer is a JavaScript array that is pushed every time an important action occurs. For a booking engine, the mandatory events to send are:
// Guest views room page
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'view_item',
ecommerce: {
items: [{
item_name: 'Ocean Suite',
item_id: 'OCEAN-001',
price: 3200000,
currency: 'IDR'
}]
}
});
// Guest clicks "Book Now"
window.dataLayer.push({
event: 'begin_checkout',
ecommerce: {
value: 3200000,
currency: 'IDR',
items: [...]
}
});
// Booking complete
window.dataLayer.push({
event: 'purchase',
ecommerce: {
transaction_id: 'BOOK-20260624-001',
value: 9600000,
currency: 'IDR',
items: [...]
}
});
What's important: every event must have a value (transaction value in rupiah). Without a value, GA4 and Google Ads only know that "there is 1 booking" without knowing its worth — and you won't be able to calculate ROAS.
Step 3: Configure GTM
Once the dataLayer sends events correctly, configure GTM to capture them:
- Create a GTM container at tagmanager.google.com.
- Install the GTM snippet in the of your website.
- Create Data Layer Variables for ecommerce.value, ecommerce.transaction_id, and ecommerce.currency.
- Create a Google Tag (GA4 Configuration) — one tag to initialize GA4 on all pages.
- Create GA4 Event Tags for view_item, begin_checkout, and purchase — each triggered by their respective Custom Event trigger.
- Create a Google Ads Conversion Tracking Tag — triggered by the purchase event, sending the conversion value from the dataLayer.
Use GTM Preview Mode to verify every event before publishing. Ensure that each step in the funnel appears in the preview with the correct values.
Step 4: Mark real-value conversions in GA4
Once the events flow into GA4:
- Go to Admin → Events in GA4.
- Mark purchase as a conversion.
- Mark begin_checkout as a conversion (optional — to measure checkout drop-off).
- Ensure the currency and value parameters appear in the Conversions report.
Once configured, GA4 will display how many bookings occurred, what their values are, and which channel the guests came from.
Step 5: Connect to Google Ads — closing the loop
The final step is connecting GA4 to Google Ads so that conversion data flows into your campaigns:
- In Google Ads: Go to Tools → Linked Accounts → Google Analytics 4.
- Select the same GA4 property as your website.
- Import the purchase conversion from GA4 into Google Ads.
- Set the conversion action to Primary and ensure the attribution model is appropriate (data-driven is recommended).
Once connected, Google Ads will display:
- Conversions: How many bookings are generated by each campaign.
- Conversion value: The total value of bookings from each campaign.
- ROAS (Return on Ad Spend): Revenue ÷ ad spend.
These are the metrics that truly matter — not CTR, not CPC, and not impressions.
Cross-domain tracking: if the booking engine is on a separate subdomain
Many villas have their website at yourvilla.com but host their booking engine at booking.yourvilla.com or on an external platform. Without cross-domain tracking, the guest's session breaks when moving between domains — and Google Ads loses track of the conversion.
To fix this in GTM:
- Edit the GA4 Configuration tag.
- Under Fields to Set, add cookie_domain with the value auto.
- Under Configure Tag → Cross-Domain Tracking, add your booking engine's domain.
- Test using GTM Preview: ensure the _ga cookie remains the same when a guest moves from the main website to the booking engine.
Pre-launch checklist
Before declaring your tracking "ready", run through this checklist:
- GTM snippet is installed on all website and booking engine pages.
- dataLayer sends view_item, begin_checkout, and purchase with the correct value and currency.
- All events appear in GTM Preview Mode with complete parameters.
- The GA4 Real-Time report displays events within seconds.
- purchase is marked as a conversion in GA4.
- Conversion value appears in GA4 reports.
- GA4 is connected to Google Ads, and the purchase conversion is imported.
- Google Ads displays conversion data (wait 24-48 hours after the first click).
- No confirmation page can be refreshed without preventing duplicate bookings (ensure transaction_id is unique).
Conclusion
Bali villa booking conversion tracking is not a complicated IT project — it is a marketing discipline that determines whether your ad budget produces real guests or just good-looking reports.
It starts with a clear funnel, a dataLayer that sends events with values, GTM to capture and forward them, GA4 to record them, and Google Ads to use them for optimization. Every step must be verified — don't trust it until you see the events appear in the Real-Time report with your own eyes.
Alpha Digital provides specialized GA4 and GTM setup for hospitality, including booking engine tracking configuration and Google Ads connection.