Understanding Ctrip Flight Ticket Data Tracking (UBT): Client‑Side and Server‑Side Event Collection and Metrics
The article explains Ctrip's comprehensive User Behavior Tracking (UBT) system for flight tickets, detailing client‑side (ctm, action, trace, pv) and server‑side tracking, their implementation, data flow, key metrics, common challenges, and best practices for reliable analytics.
Author Introduction Li Ning, senior data & product manager at Ctrip Flight Tickets, has extensive experience in user behavior analysis, user profiling, and A/B testing.
Why Tracking Matters If a data professional cannot clearly define tracking points and metrics, the analysis foundation is unstable and can become a “time bomb”. Data analysts must rely on existing tracking data, improve it continuously, and still be able to draw reliable conclusions without waiting for perfect instrumentation.
UBT Overview UBT (User Behavior Tracking) is a data framework initiated by Ctrip’s former CTO Eric Ye. It started with online tracking and later expanded to mobile apps, hybrid pages, H5, and A/B test systems. It covers data format, upload contracts, storage, ETL, and reporting.
Client‑Side Tracking Types Ctrip Flight Ticket uses five major client‑side tracking categories: ctm, action, trace, pv, and server‑side events. Each serves a specific purpose and has its own advantages and drawbacks.
1. ctm Tracking Similar to Google Analytics’ UTM, ctm records page source via GET parameters. It is used on online and H5 platforms for UV evaluation and conversion calculation. Because ctm is sent only once, it cannot directly link to order creation, requiring indirect association via session IDs.
2. PV Tracking PV (page view) tracking is the oldest and simplest method, using a logpage call with a unique pageId. It is widely accepted and serves as the baseline for validating new tracking points. Data flow: developers request a pageId, the app calls logpage, data is ETL‑ed into Hive, cleaned, and finally stored in SQL Server for BI reporting.
3. Action (Click) Tracking Click events differ across native, hybrid, and online implementations. Native clicks use a c_**** naming convention (e.g., c_search). The Hive table stores pageId and click name. Click tracking is usually mandatory unless a product manager specifies otherwise. Reporting includes click PV, click UV, click‑to‑page UV ratio, and average clicks per user.
4. Hybrid Click Tracking Before September 2016, hybrid pages lacked a unified format. The “speed” click event was standardized later. The reporting data flow relies on distinct values in the result table; developers must avoid adding variable fields that would break the dropdown filter.
5. Online Click Tracking Online tracking sends a JSON map of {click name: count} when a page is left or refreshed, saving bandwidth but losing some details (e.g., orderId) unless the structure is changed.
6. Trace Tracking Trace events are business‑level logs attached to the main flow pages (home, list, detail, fill, complete). They record all business information in a single event, simplifying conversion calculations while requiring BI approval for any changes.
Server‑Side Tracking Server‑side events capture policy‑related tags displayed on list and intermediate pages, enabling analysis of policy impact on sales. Future plans include using machine‑learning models to optimize policy display based on conversion.
Key Metrics and Their Interpretation Typical page‑level metrics include UV, visits (sessions), PV, exit count, and average dwell time (median of page start‑time differences). Business‑impact UV calculations must consider domestic vs. international homepages to avoid double‑counting. Conversion rates are derived from direct and indirect orders linked to special pages.
Data Association Practices Behavior‑to‑order linking uses clientCode (device ID) and uid (user ID) via a temporary order table created at the fill page. Behavior‑to‑behavior linking relies on clientCode, sid, and pvid. Missing data rates differ across tracking types; PV is the most stable, trace ~97% accuracy, server‑side ~103%.
Common Tracking Issues Examples include unintended click triggers on hybrid pages, mutually exclusive click events, and mismatched logic when developers and BI have different understandings of tracking requirements. Proper communication and clear documentation of mandatory vs. optional events are essential.
New vs. Old Users & Retention New users are defined by device‑level (vid/clientCode) first‑time visits or first‑time orders (uid). UV vs. order‑based UV distinctions are explained, as are the nuances of cross‑platform (app vs. online) user identification.
Other Important Indicators Quarterly repurchase rate, monthly revisit rate, dwell time (median of start‑time differences), session duration (first search‑to‑order, last search‑to‑order), and the pitfalls of mixing native and hybrid dwell‑time calculations are discussed.
Behavior Flow Visualization Building per‑user behavior flow tables enables product managers to trace UID or phone‑number paths, facilitating problem discovery and hypothesis testing via SQL.
Summary Ctrip’s flight‑ticket tracking system is complex but essential for data‑driven growth. Front‑end tracking captures user interactions, while server‑side tracking records display data. Grouping similar concepts (e.g., exit vs. bounce rate) helps avoid confusion and supports reliable analytics.
Appendix Definitions of vid/clientCode/clientId, sid, pvid, startTime, UV, and their usage in online, app, and hybrid contexts.
Ctrip Technology
Official Ctrip Technology account, sharing and discussing growth.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.