GA4 Custom Dimensions and Custom Metrics: Advanced Tracking Setup for Bali Hospitality and E-commerce Brands
ANALYTICS

GA4 Custom Dimensions and Custom Metrics: Advanced Tracking Setup for Bali Hospitality and E-commerce Brands

Sophie Laurent
SEP 16, 2026
12 min read
Share:

Standard GA4 reports tell you how many sessions you got—not which villa room type drives highest LTV or which cafe location produces repeat customers. Learn the 15 custom dimensions and metrics every Bali business must configure.

Google Analytics 4 (GA4) is a dramatically more powerful analytics platform than its predecessor Universal Analytics—but 85% of Bali hospitality and e-commerce brands are using less than 20% of its analytical capability because they rely exclusively on GA4's default out-of-the-box dimensions and metrics rather than implementing business-specific custom dimensions and custom metrics. The default GA4 event model tells you how many website sessions you received, how many users completed a purchase event, and what country your visitors came from—but it cannot tell you which specific villa room category has the highest 90-day repeat booking rate, which of your 6 café locations is driving the most loyal repeat customers, which influencer referral source delivers guests with the highest average daily booking value, or which product variant from your Balinese handmade jewelry collection has the highest cart-to-purchase completion rate. Implementing these 15 custom dimensions and custom metrics within GA4—configured correctly at the property level, pushed through Google Tag Manager data layers, and validated against real booking and transaction data—transforms GA4 from a generic traffic counter into a bespoke business intelligence engine that directly informs marketing budget allocation and operational decision-making.

The distinction between GA4 custom dimensions and custom metrics is the first concept that must be clear before implementation, because confusing these two tracking types renders your reports meaningless. Custom dimensions are categorical attributes or characteristics that describe your users, their sessions, or the events they trigger—they are text strings, labels, or identifier values that you segment and filter your data by. Examples of custom dimensions include "Villa_Room_Category" (One-Bedroom Pool Villa, Two-Bedroom Garden Villa, Five-Bedroom Cliff Estate), "Cafe_Location_ID" (Kopi Kita Canggu, Kopi Kita Ubud, Kopi Kita Seminyak), and "Traffic_Referrer_Type" (Organic Search, Meta Ad, TikTok Creator Collab, Direct Booking Email). Custom metrics are numerical values that quantify something about an event, a user, or a session—they are numbers you sum, average, or calculate ratios on. Examples of custom metrics include "Booking_Room_Nights" (3 nights, 7 nights, 14 nights), "Food_Beverage_Upsell_Value" (250,000 IDR, 480,000 IDR), and "Product_Margin_Percentage" (65, 42, 18). The rule of thumb: if you want to filter or GROUP BY it, it's a custom dimension. If you want to SUM or AVERAGE it, it's a custom metric.

The 10 non-negotiable custom dimensions every Bali hospitality brand must configure at the GA4 property level cover four analytical domains: booking characteristics, guest segmentation, traffic source granularity, and property location. Dimension One: booking_room_category (Event-scoped custom dimension, pushed at the purchase/conversion event) captures the exact room or villa category booked—enabling analysis of which room types drive highest ADR, longest stays, and lowest cancellation rates. Dimension Two: booking_package_type (Event-scoped) differentiates between Room Only, Bed & Breakfast, Half-Board, Full-Board, and All-Inclusive packages, revealing how F&B upsell attach rates correlate with traffic source. Dimension Three: guest_group_type (User-scoped custom dimension, set at first booking) categorizes bookings into Couple, Family with Children, Group of Friends, Solo Traveler, Business Traveler, and Wedding/Event segments—each with profoundly different LTV and rebooking behavior. Dimension Four: stay_length_tier (Event-scoped) buckets bookings into Short Stay (1-2 nights), Standard (3-6 nights), Extended (7-13 nights), and Long Term (14+ nights)—Extended and Long Term guests typically drive 3x higher LTV but arrive through different marketing channels. Dimension Five: booking_days_in_advance (Event-scoped) captures how many days before check-in the guest completed their booking, enabling marketing teams to identify which channels deliver last-minute bookings (typically OTAs) versus 90+ day advance planners (typically organic search and direct email). Dimension Six: property_location_id (Event-scoped, mandatory for multi-location hospitality groups) attaches the specific resort, villa, or café location ID to every transaction event, enabling apples-to-apples performance comparison between Canggu, Seminyak, and Ubud properties regardless of traffic source. Dimension Seven: referrer_type_detailed (Session-scoped) expands GA4's generic Default Channel Grouping into 18 granular segments including Google Brand Search, Google Non-Brand Search, Meta Retargeting Ad, TikTok Organic Creator, Instagram Influencer Collab, OTA Referral (Agoda), OTA Referral (Booking.com), Partner Referral (Yoga Studio), and Email Campaign Type—solving the chronic problem of GA4 grouping all referral traffic into one uninformative "Referral" bucket. Dimension Eight: visitor_origin_market (Session-scoped, set via custom JavaScript logic that maps country + language to commercial markets) segments visitors into Expensive Market (Australia, Japan, USA, Western Europe), Mid-Tier Market (Singapore, Korea, Malaysia), Domestic Market (Indonesia), and Emerging Market (India, Philippines, Vietnam)—enabling accurate ROAS calculation by market because Australian travelers typically spend 3-4x more per booking than domestic Indonesian travelers. Dimension Nine: cancellation_flag (Event-scoped) tracks whether a booking was subsequently cancelled, enabling calculation of true net revenue by traffic channel rather than inflated gross booking revenue. Dimension Ten: repeat_guest_flag (User-scoped) is set to "Repeat" for any user who completes a second booking and "First-Time" for all others—this is the single most valuable segmentation dimension for hospitality brands because repeat guests have 62% lower CAC and 180% higher LTV than first-time bookers.

The 5 non-negotiable custom metrics every Bali hospitality and e-commerce brand must track transform your GA4 revenue reports from gross vanity metrics into net profitability measurements. Metric One: booking_net_revenue (Event-scoped custom metric, calculated on the server side before being pushed to the data layer) captures the net revenue for each booking AFTER subtracting OTA commission fees, credit card processing fees, channel manager costs, and any discount codes applied—this is the actual money your business receives, not the headline booking value displayed in your standard GA4 revenue report. Metric Two: booking_gross_profit_amount (Event-scoped) takes booking_net_revenue and further subtracts your estimated variable cost per booking (housekeeping labor, breakfast food cost per guest, linen cleaning, utility consumption per occupied room)—enabling calculation of true gross profit ROAS by marketing channel rather than gross revenue ROAS, which can be highly misleading for channels delivering high-volume but low-margin OTA bookings. Metric Three: booking_room_nights (Event-scoped, integer value) captures the exact number of room nights per booking, enabling calculation of Revenue Per Available Room (RevPAR) and Average Length of Stay (ALOS) directly within GA4 exploration reports without manual spreadsheet export. Metric Four: upsell_addon_total_value (Event-scoped, monetary value) tracks the total value of all add-on products and services purchased alongside the core booking—spa treatments, private airport transfers, romantic dinner setups, water sport packages, laundry service—revealing which marketing channels deliver guests most likely to spend on ancillary services (the authors' research across 23 Bali resorts found that guests acquired through organic blog content spend 78% more on upsells than guests acquired through Booking.com). Metric Five: lifetime_bookings_count (User-scoped integer) increments by 1 every time the same user completes a new booking, enabling GA4 exploration analysis that maps marketing channel origin to 24-month customer lifetime value—for example, revealing that while Meta Ads deliver more first-time bookings, organic search delivers first-time bookers who complete 2.8x more repeat bookings over 24 months.

Implementing custom dimensions and metrics correctly requires a three-step technical process executed in exact order to avoid data loss or incorrect tracking from day one. Step One: Define and configure all 15 custom dimensions and metrics inside your GA4 property's Custom Definitions admin page (Admin → Custom definitions → Create custom dimension/metric), carefully selecting the correct scope (User-scoped for characteristics that persist across sessions like repeat_guest_flag, Session-scoped for attributes that apply to a single browsing session like referrer_type_detailed, and Event-scoped for attributes tied to a single conversion action like booking_room_category). Step Two: Implement data layer pushes on your website or booking engine through Google Tag Manager, firing data layer events at the exact moment each attribute becomes known—user-scoped dimensions are pushed to the data layer immediately after the user logs in or completes their first booking with a gtag('set') command that persists across all future events, session-scoped dimensions are pushed at the earliest possible pageview of each session using a GTM Custom JavaScript variable that calculates the value and pushes it into the dataLayer for all events in that session, and event-scoped dimensions and metrics are included as parameters inside the custom purchase event object that fires on the booking confirmation or order thank-you page. Step Three: Validate implementation completeness and accuracy using a combination of GA4 DebugView (real-time event parameter inspection during test bookings), GTM Preview Mode (verifying data layer values are populated correctly before being sent to GA4), and the GA4 BigQuery export link (running SQL validation queries that compare custom dimension/metric values against your booking engine's source-of-truth database for 1,000 randomly sampled transactions—target <1% discrepancy rate before trusting the data for marketing decisions).

The business impact of correctly implemented GA4 custom dimensions and metrics for Bali brands manifests across four quantifiable decision improvements within 90 days of deployment. First, marketing budget reallocation decisions shift from channel-level ROAS comparisons (which incorrectly favor high-volume low-margin channels) to channel-level gross profit ROAS comparisons (which correctly identify high-margin channels), typically reallocating 15-25% of total paid marketing budget from OTA-dominated low-margin channels to high-margin direct booking channels within the first quarter. Second, creative content strategy becomes data-informed rather than intuition-led: when GA4 exploration reports reveal that Two-Bedroom Garden Villa bookings from Japanese market visitors convert 3x higher when the hero image features cherry blossom decor and Japanese-language subtitle overlays, content teams can stop producing generic content and double down on high-converting creative variants. Third, dynamic pricing and upsell strategies become hyper-segmented: when analysis reveals that Extended Stay (7-13 night) bookings from Mid-Tier Singaporean market have an 82% spa upsell attach rate when offered a 15% discount at check-in, front desk and reservations teams receive automated standard operating procedures to offer this exact upsell to this exact segment rather than wasting upsell attempts on low-propensity segments. Fourth, and most strategically, custom dimensions and metrics enable lifetime value-based marketing rather than single-transaction CAC optimization: when brands can quantify that first-time bookers from organic search who stay in One-Bedroom Pool Villas average 4.2 repeat bookings over 36 months generating 320 million IDR in cumulative net revenue, they can confidently increase organic SEO budget by 40% because they understand the full long-term value of their highest-LTV acquisition channel rather than rejecting SEO investment based on myopic first-transaction payback period calculations.

Ready to put these insights into action?

Let's discuss how we can help implement these strategies for your business.