Doc Status: Current. Browser events originate from apps/landing/lib/analytics/analytics.ts. Server events originate from apps/hono/src/services/analytics/posthog-analytics.service.ts.

Why This Matters

House of Legends tracks 54 distinct analytics events across browser and server. This page is the single source of truth for what is tracked, where it fires, and which platform receives it.

Platform Distribution

PlatformEvents receivedCount
PostHogAll browser + all server54
Meta PixelBrowser events mapped to Meta standard events7
Meta CAPIServer Purchase + forwarded browser events4
GTM dataLayerAll browser (dormant — not mounted)0

Browser Events (46)

Every browser event fires to PostHog. Events marked with Meta also fire to Meta Pixel. Events marked with CAPI are additionally forwarded by Hono to Meta Conversions API.

Booking Funnel

#EventMetaCAPIWhen it fires
1view_itemViewContentViewing a show/experience detail
2add_to_cartAddToCartAdding an experience to the booking cart
3remove_from_cartRemoving an experience from the cart
4addons_updateAdding, removing, or changing addon quantity
5view_cartViewing the booking cart summary
6booking_stepBooking funnel step completed or abandoned
7begin_checkoutInitiateCheckoutInitiateCheckoutGuest enters payment checkout
8add_payment_infoAddPaymentInfoAddPaymentInfoGuest submits payment details
9purchasePurchaseServer-confirmed paid booking (payment-result page, paymentStatus=PAID)
10payment_redirectRedirect to/from OnePay payment page
11payment_errorPayment redirect failed, timed out, or abandoned
12payment_cta_clickPay Now / Contact Support CTA clicked

Conversion and Leads

#EventMetaCAPIWhen it fires
13leadLeadLeadQualified inquiry submitted
14inquiry_startGuest opens an inquiry form
15form_abandonmentGuest leaves inquiry form without submitting
16form_errorValidation error on a form field
17book_now_clickBook Now CTA clicked (with source and event context)
18promo_appliedPromo code applied successfully
19promo_rejectedPromo code rejected (invalid or expired)
20promo_removedPromo code removed from booking

Engagement

#EventMetaCAPIWhen it fires
21page_viewPageViewEvery page navigation
22select_itemUser selects a show/experience from a list
23select_contentUser taps a content element
24external_linkUser taps an external link
25scroll_depthUser scrolls to a depth threshold
26timingPerformance timing measurement
27section_viewA marked page section becomes visible
28section_readA marked section viewed for at least 1 second
29video_playShow page video starts playing
30video_completeShow page video finishes
31homepage_video_playHomepage hero video starts playing
32homepage_video_completeHomepage hero video finishes

User Interaction

#EventMetaCAPIWhen it fires
33customer_support_widgetSupport widget interaction (open, close, phone, WhatsApp, chat)
34searchSearch query submitted with results
35search_refinementSearch query refined
36empty_searchSearch submitted with no results
37language_switchUser switches locale (en/vi)
38mobile_keyboardMobile keyboard opens or closes (with viewport change)
39email_subscribeUser subscribes to email (footer, popup, or booking confirmation)
40pdf_downloadUser downloads a PDF

Session and Attribution

#EventMetaCAPIWhen it fires
41session_startAnalytics session begins
42session_endAnalytics session ends
43utm_captureUTM parameters detected on landing

Diagnostics

#EventMetaCAPIWhen it fires
44$exceptionUncaught frontend error
45api_errorNetwork, timeout, server, or client API error
46404Page not found

Server Events (8)

All server events fire to PostHog from our backend. The payment completed event is also sent to Meta CAPI as a server Purchase.
Server events are sent via the posthog-node SDK from the Hono backend service.
#EventMeta CAPIWhen it fires
1reservation createdNew reservation persisted
2checkout startedGuest enters the payment checkout step
3payment completedPurchaseOnePay confirms a successful payment
4payment failedOnePay reports a payment failure
5reservation cancelledReservation status moves to cancelled
6refund processedRefund amount recorded against a payment
7inquiry submittedNew inquiry created from the public form
8operator check-in completedStaff checks a guest in through Mission Control

PostHog Identity and Replay

Beyond events, PostHog also captures:
FeatureStatusDetails
Person identificationActiveCRM customer ID used as distinctId after early lead capture
Session replayActiveUnmasked form inputs and request/response payloads for booking recovery
AutocaptureDisabledManual event tracking only
Page leaveActiveCaptured automatically when a visitor navigates away
Autocapture is disabled via NEXT_PUBLIC_POSTHOG_AUTOCAPTURE_ENABLED=false. Page leave capture is enabled via capture_pageleave: true in the PostHog init options.