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_itemViewContent—Viewing a show/experience detail
2add_to_cartAddToCart—Adding an experience to the booking cart
3remove_from_cart——Removing an experience from the cart
4addons_update——Adding, removing, or changing addon quantity
5view_cart——Viewing the booking cart summary
6booking_step——Booking funnel step completed or abandoned
7begin_checkoutInitiateCheckoutInitiateCheckoutGuest enters payment checkout
8add_payment_infoAddPaymentInfoAddPaymentInfoGuest submits payment details
9purchasePurchase—Server-confirmed paid booking (payment-result page, paymentStatus=PAID)
10payment_redirect——Redirect to/from OnePay payment page
11payment_error——Payment redirect failed, timed out, or abandoned
12payment_cta_click——Pay Now / Contact Support CTA clicked

Conversion and Leads

#EventMetaCAPIWhen it fires
13leadLeadLeadQualified inquiry submitted
14inquiry_start——Guest opens an inquiry form
15form_abandonment——Guest leaves inquiry form without submitting
16form_error——Validation error on a form field
17book_now_click——Book Now CTA clicked (with source and event context)
18promo_applied——Promo code applied successfully
19promo_rejected——Promo code rejected (invalid or expired)
20promo_removed——Promo code removed from booking

Engagement

#EventMetaCAPIWhen it fires
21page_viewPageView—Every page navigation
22select_item——User selects a show/experience from a list
23select_content——User taps a content element
24external_link——User taps an external link
25scroll_depth——User scrolls to a depth threshold
26timing——Performance timing measurement
27section_view——A marked page section becomes visible
28section_read——A marked section viewed for at least 1 second
29video_play——Show page video starts playing
30video_complete——Show page video finishes
31homepage_video_play——Homepage hero video starts playing
32homepage_video_complete——Homepage hero video finishes

User Interaction

#EventMetaCAPIWhen it fires
33customer_support_widget——Support widget interaction (open, close, phone, WhatsApp, chat)
34search——Search query submitted with results
35search_refinement——Search query refined
36empty_search——Search submitted with no results
37language_switch——User switches locale (en/vi)
38mobile_keyboard——Mobile keyboard opens or closes (with viewport change)
39email_subscribe——User subscribes to email (footer, popup, or booking confirmation)
40pdf_download——User downloads a PDF

Session and Attribution

#EventMetaCAPIWhen it fires
41session_start——Analytics session begins
42session_end——Analytics session ends
43utm_capture——UTM parameters detected on landing

Diagnostics

#EventMetaCAPIWhen it fires
44$exception——Uncaught frontend error
45api_error——Network, timeout, server, or client API error
46404——Page 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 created—New reservation persisted
2checkout started—Guest enters the payment checkout step
3payment completedPurchaseOnePay confirms a successful payment
4payment failed—OnePay reports a payment failure
5reservation cancelled—Reservation status moves to cancelled
6refund processed—Refund amount recorded against a payment
7inquiry submitted—New inquiry created from the public form
8operator check-in completed—Staff 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.