Cùng cơ chế với ../metrics/: bảng chiều + bảng sự kiện, chỉ thêm
không sửa, payload gốc giữ trong _raw/.
The same mechanism as ../metrics/: dimension tables + event tables, append only, never edited, with raw payloads kept in _raw/.
🔴 Tách kho là có chủ ý. Hai kênh đo những thứ không quy về nhau được: cửa sổ khác nhau, định nghĩa "booking" khác nhau, hoa hồng khác nhau. Trộn sớm là mất khả năng truy một con số về đúng nguồn của nó. Gộp là việc của lớp trình bày, làm sau, và làm tường minh.
🔴 Keeping the stores separate is deliberate. The two channels measure things that cannot be reduced to one another: different windows, different definitions of "booking", different commissions. Mixing them early means losing the ability to trace a figure back to its source. Merging is the job of the presentation layer, done later and explicitly.
metrics-agoda/
├── dim_property.csv 7 căn × kênh agoda (external_id = Agoda hotel id)
├── fact_agoda_summary.csv 84 · mốc × căn × chỉ số × KỲ
├── fact_agoda_daily.csv 178 · mốc × căn × NGÀY × trục (book|stay)
├── fact_agoda_transactions.csv 28 · 1 GIAO DỊCH tiền
├── fact_agoda_reservations.csv 14 · 1 ĐƠN đặt phòng
├── fact_agoda_reviews.csv 8 · 1 REVIEW
├── agoda_ranking.csv 56 · 1 căn × 1 lượt tìm kiếm công khai (thứ hạng Best match)
├── _raw/<ngày>-agoda/ payload gốc, mỗi căn một file JSON
└── README.md file này
metrics-agoda/
├── dim_property.csv 7 properties × agoda channel (external_id = Agoda hotel id)
├── fact_agoda_summary.csv 84 · snapshot × property × metric × PERIOD
├── fact_agoda_daily.csv 178 · snapshot × property × DAY × axis (book|stay)
├── fact_agoda_transactions.csv 28 · 1 money TRANSACTION
├── fact_agoda_reservations.csv 14 · 1 RESERVATION
├── fact_agoda_reviews.csv 8 · 1 REVIEW
├── agoda_ranking.csv 56 · 1 property × 1 public search (Best match rank)
├── _raw/<date>-agoda/ raw payloads, one JSON file per property
└── README.md this file
Cào rồi nạp:
Crawl, then load:
node scripts/ota-agoda-metrics-crawl.mjs # → _raw/<ngày>-agoda/
python3 scripts/ota-agoda-metrics-extract.py # → 5 bảng fact_agoda_*
python3 scripts/build-agoda-page.py # → tab Agoda của báo cáo
python3 scripts/build-agoda-data-page.py # → tab Data_Agoda
node scripts/ota-agoda-metrics-crawl.mjs # → _raw/<date>-agoda/
python3 scripts/ota-agoda-metrics-extract.py # → 5 fact_agoda_* tables
python3 scripts/build-agoda-page.py # → the Agoda tab of the report
python3 scripts/build-agoda-data-page.py # → the Data_Agoda tab
Khoá tự nhiên từng bảngNatural keys of each table
| Bảng | Một dòng là gì | Khoá |
|---|---|---|
dim_property |
1 chỗ nghỉ × kênh agoda | (slug, channel) |
fact_agoda_summary |
1 mốc × căn × chỉ số × kỳ | (snapshot_date, channel, slug, metric, period_type) |
fact_agoda_daily |
1 mốc × căn × ngày × trục | (snapshot_date, channel, slug, date, basis) |
fact_agoda_transactions |
1 giao dịch tiền | (channel, slug, transaction_id) |
fact_agoda_reservations |
1 đơn | (channel, slug, booking_id) |
fact_agoda_reviews |
1 review | (channel, slug, review_id) |
agoda_ranking |
1 căn × 1 tìm kiếm × 1 lượt đo | (snapshot_date, search_id, pass_no, slug) |
| Table | One row is | Key |
|---|---|---|
dim_property |
1 property × agoda channel | (slug, channel) |
fact_agoda_summary |
1 snapshot × property × metric × period | (snapshot_date, channel, slug, metric, period_type) |
fact_agoda_daily |
1 snapshot × property × day × axis | (snapshot_date, channel, slug, date, basis) |
fact_agoda_transactions |
1 money transaction | (channel, slug, transaction_id) |
fact_agoda_reservations |
1 reservation | (channel, slug, booking_id) |
fact_agoda_reviews |
1 review | (channel, slug, review_id) |
agoda_ranking |
1 property × 1 search × 1 measurement pass | (snapshot_date, search_id, pass_no, slug) |
Nối đơn ↔ tiền: fact_agoda_reservations.booking_id = fact_agoda_transactions.reference_number
(kiểm 2/2 trên 181 THT). Danh sách đơn không kèm tiền, nên muốn doanh thu từng đơn thì
bắt buộc phải nối. booking_value = 0 nghĩa là đơn đã huỷ — 9/28 giao dịch đang như vậy,
giống hệt cách Booking xoá giá đơn huỷ.
Linking reservation ↔ money: fact_agoda_reservations.booking_id = fact_agoda_transactions.reference_number (checked 2/2 on 181 THT). The reservation list does not include money, so to get the revenue of each reservation the link is required. booking_value = 0 means the reservation was cancelled — 9/28 transactions are like this, exactly the way Booking clears the price of cancelled reservations.
Bản đồ endpoint — dò ngày 24/09/2026Endpoint map — probed 24/09/2026
Cây menu đầy đủ không cần bấm: GET /mldc/en-us/api/layout/<id>/PrivateLayout/Main.
The full menu tree needs no clicking: GET /mldc/en-us/api/layout/<id>/PrivateLayout/Main.
| Việc | Trang | API |
|---|---|---|
| Tổng quan | /app/reporting/dashboard/<id> |
reporting/PerformanceDashboard/GetPerformanceSummaries/<id> |
| Hạng so đối thủ | cùng trên | reporting/MarketInsights/RankingAgainstCompetitors/<id> |
| Phân tích | /app/reporting/analyticscenter/<id> |
reporting/BookingInsights/GetTimeFrameMetrics/<id> · …/GetTopCompetitors/<id> |
| Đơn | /app/postbook/booking/<id> |
postbook/Booking/list/<id> — POST, ngày dạng /Date(ms)/ |
| Review | /app/setting/review/<id> |
setting/Review/searchreviews/<id> |
| Tiền từng đơn | /app/finance/transactions/<id> |
finance/LegacyTransactions/<id>/SearchTransactions |
| Task | Page | API |
|---|---|---|
| Overview | /app/reporting/dashboard/<id> |
reporting/PerformanceDashboard/GetPerformanceSummaries/<id> |
| Ranking vs competitors | same as above | reporting/MarketInsights/RankingAgainstCompetitors/<id> |
| Analysis | /app/reporting/analyticscenter/<id> |
reporting/BookingInsights/GetTimeFrameMetrics/<id> · …/GetTopCompetitors/<id> |
| Reservations | /app/postbook/booking/<id> |
postbook/Booking/list/<id> — POST, dates in the form /Date(ms)/ |
| Reviews | /app/setting/review/<id> |
setting/Review/searchreviews/<id> |
| Money per reservation | /app/finance/transactions/<id> |
finance/LegacyTransactions/<id>/SearchTransactions |
Agoda dễ hơn Booking ở hai chỗAgoda is easier than Booking in two places
① Ngày là tham số thật. RankingAgainstCompetitors?startDate=YYYY-MM-DD&dayRange=N nhận
ngày tuỳ ý — thử startDate=2025-09-01 và dayRange=365 đều được phục vụ, không bị ép
như date_from của Booking. Cũng không có chuyện token nonce hay trần 3 tháng mỗi lần hỏi.
① The date is a real parameter. RankingAgainstCompetitors?startDate=YYYY-MM-DD&dayRange=N accepts any date — trying startDate=2025-09-01 and dayRange=365 both return data, without being forced the way Booking's date_from is. There is also no nonce token and no 3-month cap per query.
② Phân trang tử tế. Booking/list trả pagedBookingList{totalCount, pageSize, hasNextPage, totalPages} — không phải đoán như hasNextPage rỗng của Booking.
② Proper pagination. Booking/list returns pagedBookingList{totalCount, pageSize, hasNextPage, totalPages} — no guessing, unlike Booking's empty hasNextPage.
Và khó hơn ở hai chỗAnd harder in two places
① GetTimeFrameMetrics chỉ có 4 kỳ cứng, lùi tối đa 30 ngày.
① GetTimeFrameMetrics has only 4 fixed periods, and goes back at most 30 days.
timeFrameType |
1 = theo ngày ĐẶT · 2 = theo ngày Ở |
|---|---|
period |
1 = 14 ngày qua · 2 = 30 ngày qua · 3 = 14 ngày tới · 4 = 30 ngày tới |
timeFrameType |
1 = by BOOKING date · 2 = by STAY date |
|---|---|
period |
1 = last 14 days · 2 = last 30 days · 3 = next 14 days · 4 = next 30 days |
Bù lại, nó trả daily[] — chuỗi theo NGÀY, thứ Ranking Dashboard của Booking không hề có.
In return, it gives daily[] — a series by DAY, which Booking's Ranking Dashboard does not have at all.
② periodType chưa giải mã hết. GetPerformanceSummaries trả periodSummary[] với
periodType 0 · 1 · 2 · 3, và API không khai nghĩa.
② periodType is not fully decoded. GetPerformanceSummaries returns periodSummary[] with periodType 0 · 1 · 2 · 3, and the API does not state what they mean.
- ✅
periodType 1= this month — xác minh bằng cách đối chiếu với con số hiện trên dashboard của 181 Tô Hiến Thành (Revenue 8.235.938 ₫). - ⬜
0·2·3chưa chốt. Nhìn độ lớn thì3là kỳ dài nhất,2ở giữa — nhưng đó là suy đoán. Script ghi nguyên sốperiodType, không tự đặt tên. Muốn chốt thì đối chiếu từng giá trị với nhãn trên dashboard như đã làm vớiperiodType 1.
- ✅
periodType 1= this month — verified by matching the figure shown on the dashboard of 181 Tô Hiến Thành (Revenue 8,235,938 ₫). - ⬜
0·2·3not yet confirmed. Judging by size,3is the longest period and2is in between — but that is guesswork. The script records theperiodTypenumber as-is, without naming it. To confirm, match each value against the label on the dashboard, as was done forperiodType 1.
performanceType: 0 = đêm phòng · 1 = doanh thu · 3 = lượt đặt (suy từ đơn vị và độ
lớn, chưa đối chiếu nhãn). 2 và 4..7 chưa dùng.
performanceType: 0 = room nights · 1 = revenue · 3 = bookings (inferred from the unit and the size, not yet checked against the labels). 2 and 4..7 are not used yet.
Số đầu tiên — mốc 24/09/2026First figures — the 24/09/2026 mark
| Căn | Doanh thu p3 |
Lượt đặt p3 |
|---|---|---|
| 181 Tô Hiến Thành | 111.993.840 ₫ | 10 |
| 15 Nước Mặn 5 | 36.520.736 ₫ | 3 |
| A La Carte 502 | 6.240.000 ₫ | 1 |
| 305 · 404 · 41 LHC · 25 AT11 | 0 | 0 |
| Property | Revenue p3 |
Bookings p3 |
|---|---|---|
| 181 Tô Hiến Thành | 111,993,840 ₫ | 10 |
| 15 Nước Mặn 5 | 36,520,736 ₫ | 3 |
| A La Carte 502 | 6,240,000 ₫ | 1 |
| 305 · 404 · 41 LHC · 25 AT11 | 0 | 0 |
🔴 Đây là doanh thu mà báo cáo Booking hoàn toàn không thấy. 181 Tô Hiến Thành — căn mà bên Booking chỉ có 45,3 tr doanh thu 12 tháng và bị 70% huỷ — bán được 112 triệu bên Agoda. Bất kỳ kết luận nào về "căn này yếu" mà chỉ nhìn Booking đều sai.
🔴 This is revenue the Booking report does not see at all. 181 Tô Hiến Thành — the property that on Booking has only 45.3M revenue over 12 months and 70% cancellations — sold 112 million on Agoda. Any conclusion that "this property is weak" drawn from Booking alone is wrong.
⚠️ Chưa biết p3 là cửa sổ nào, nên chưa được so thẳng với con số 12 tháng của Booking.
Đó là việc phải làm trước khi gộp hai kênh.
⚠️ The window that p3 covers is still unknown, so it cannot yet be compared directly with Booking's 12-month figure. That has to be done before the two channels are merged.
Điều kiện chạyConditions for running
Giống hệt Booking — xem /ota-metrics-crawl
§0: đúng profile Chrome (Huy), tab con phải mở bằng window.open từ tab đã đăng nhập,
daemon CDP còn sống và chưa đầy bộ đệm. Cần một tab portal.agoda.com đang mở.
Exactly the same as Booking — see /ota-metrics-crawl §0: the right Chrome profile (Huy), the child tab must be opened with window.open from a signed-in tab, the CDP daemon still alive and not full of its buffer. Needs one portal.agoda.com tab open.
Ngày bắt đầu active — dò 25/09/2026Go-live start date — probed 25/09/2026
Agoda không có trường "ngày lên sóng". Đã dò cả 27 mục menu YCS: hợp đồng, compliance,
property details, payouts, remittances, calendar, property switcher — không trang nào khai.
Nên ngày phải suy từ dấu vết, bằng node scripts/ota-agoda-active-from.mjs.
Agoda has no "go-live date" field. I checked all 27 YCS menu items: contract, compliance, property details, payouts, remittances, calendar, property switcher — no page states it.
So the date has to be inferred from traces, using node scripts/ota-agoda-active-from.mjs.
| Căn | active_from |
Căn cứ | Hợp đồng sớm nhất |
|---|---|---|---|
181tohienthanh |
2026-01-23 | 📧 khách hỏi phòng (sớm hơn đơn đầu 19/02 gần một tháng) | 2026-01-19 |
alacarte305 |
2025-03-06 | đơn đặt sớm nhất (khách hỏi cùng buổi sáng, 10:08) | 2024-12-25 |
15nuocman5 |
2026-06-19 | đơn đặt sớm nhất (ở 26/06/2026) | 2026-02-02 |
alacarte502 |
2026-06-22 | đơn đặt sớm nhất (ở 16/07/2026) | 2026-02-02 |
25anthuong11 |
2026-09-18 | 📧 Agoda tự khai — thư "Your property has been published!" 19:41 | 2026-09-18 |
alacarte404 |
— | chưa bán được đêm nào · không thư Agoda nào từng nhắc tên căn này | 2026-02-02 |
41lehycat |
— | chưa bán được đêm nào · thư sớm nhất nhắc tên là 08/07/2026, nhưng chỉ là thư marketing | 2026-02-02 |
| Property | active_from |
Basis | Earliest contract |
|---|---|---|---|
181tohienthanh |
2026-01-23 | 📧 guest asked about a room (nearly a month before the first booking on 19/02) | 2026-01-19 |
alacarte305 |
2025-03-06 | earliest booking (guest asked the same morning, 10:08) | 2024-12-25 |
15nuocman5 |
2026-06-19 | earliest booking (on 26/06/2026) | 2026-02-02 |
alacarte502 |
2026-06-22 | earliest booking (on 16/07/2026) | 2026-02-02 |
25anthuong11 |
2026-09-18 | 📧 Agoda self-declared — email "Your property has been published!" at 19:41 | 2026-09-18 |
alacarte404 |
— | has not sold any night yet · no Agoda email has ever mentioned this property's name | 2026-02-02 |
41lehycat |
— | has not sold any night yet · the earliest email naming it is dated 08/07/2026, but it is only a marketing email | 2026-02-02 |
active_from là cận trên quan sát được: listing chắc chắn đã active trước hoặc đúng
ngày đó, không có gì bảo đảm nó active đúng ngày đó. Cùng quy ước với kho Booking.
active_from is an observable upper bound: the listing was certainly active before or on that day, with no guarantee that it was active on exactly that day. Same convention as the Booking store.
Cột contract_from là lần chấp thuận điều khoản sớm nhất của chính căn đó — trần trên
của ngày tạo hồ sơ. Để riêng, không thế vào active_from: ký giấy xong vẫn có thể chưa
bật bán. Khoảng cách giữa hai cột nói lên điều đó: 305 ký 25/12/2024 mà mãi 06/03/2025 mới
có đơn; bốn căn cùng ký 02/02/2026 nhưng 15 NM5 tới 19/06 mới bán được, còn 404 và 41 LHC
tới nay vẫn chưa.
The contract_from column is the earliest approval of the property's own terms — the upper bound on the date the profile was created. Kept separate, it is not substituted into active_from: a contract signed on paper can still be unopened for sale. The gap between the two columns shows it: 305 signed on 25/12/2024 but only got a booking on 06/03/2025; four properties signed on 02/02/2026, but 15 NM5 could only sell from 19/06, while 404 and 41 LHC still have not.
🔴 Ba căn để trống là "chưa quan sát được", KHÔNG phải "chưa active". Ba bằng chứng:
🔴 Three properties left blank means "not yet observed", NOT "not active". Three pieces of evidence:
PropertyRecStatus = 1— giống hệt bốn căn đang bán được. Không có căn nào ở trạng thái nháp hay bị tạm ngưng.- Lịch đang mở và đang có giá: 404 48 ngày · 41 LHC 90 · 25 AT11 88.
totalPages: 0trênSearchTransactionsxác nhận không có đơn thật, không phải lỗi phân trang (phân biệt với zero-rows-may-mean-logged-out).
PropertyRecStatus = 1— exactly the same as the four properties that can sell. None of them is in draft or temporarily suspended.- Calendar open and with prices: 404 48 days · 41 LHC 90 · 25 AT11 88.
totalPages: 0onSearchTransactionsconfirms there are no real reservations, not a pagination error (to be distinguished from zero-rows-may-mean-logged-out).
Nên chỗ trống không phải lỗi đọc, cũng không phải listing hỏng — nó là hệ quả của cách suy ngày. Mọi dấu vết Agoda giữ lại đều là dấu vết khách để lại (đơn, review, giao dịch, payout). Căn chưa có khách thì không để lại gì để neo.
So the blank is not a reading error, and not a broken listing — it is a consequence of how the date is inferred. Every trace Agoda keeps is a trace left by a guest (reservations, reviews, transactions, payouts). A property with no guests has nothing to anchor it to.
Thứ suy được là một KHOẢNG, không phải một ngày:
What can be inferred is a RANGE, not a single date:
| Căn | Sớm nhất có thể | Muộn nhất có thể | Rộng |
|---|---|---|---|
alacarte404 |
02/02/2026 (ký hợp đồng) | hôm nay | ~8 tháng |
41lehycat |
02/02/2026 (ký hợp đồng) | hôm nay | ~8 tháng |
25anthuong11 |
18/09/2026 (ký hợp đồng) | hôm nay | ~1 tuần |
| Property | Earliest possible | Latest possible | Width |
|---|---|---|---|
alacarte404 |
02/02/2026 (contract signed) | today | ~8 months |
41lehycat |
02/02/2026 (contract signed) | today | ~8 months |
25anthuong11 |
18/09/2026 (contract signed) | today | ~1 week |
25 An Thượng 11 hẹp tới mức coi như đã có đáp số: property tạo bằng Fast-track import và chỉ chấp thuận đúng bản điều khoản hiện hành, nên 18/09/2026 vừa là ngày ký vừa là ngày tạo hồ sơ. Hai căn còn lại thì khoảng quá rộng để gọi là một ngày.
25 An Thượng 11 is narrow enough to count as already solved: the property was created by Fast-track import and accepted only the currently effective terms, so 18/09/2026 is both the signing date and the profile creation date. The other two properties have too wide a range to call it one day.
Cách duy nhất làm hẹp thêm: đợi đơn đầu tiên, hoặc hỏi Agoda support (họ giữ lịch sử trạng thái property, portal thì không).
The only way to narrow it further: wait for the first booking, or ask Agoda support (they keep the history of the property's status; the portal does not).
Bên trong hợp đồng có gì — mở đọc 25/09/2026What the contract contains — read on 25/09/2026
Nút View contract mở modal trong trang (không phải PDF, không mở tab mới). Nội dung là văn bản chung của Agoda, không có tên căn và không có ngày ký riêng. Thứ duy nhất có ngày là dòng đầu — ngày hiệu lực của phiên bản điều khoản, giống hệt nhau ở mọi căn:
The View contract button opens a modal inside the page (not a PDF, and not a new tab). The content is Agoda's general text, with no property name and no separate signing date. The only thing with a date is the first line — the effective date of the version of the terms, identical for every property:
| id | Phiên bản | Ngày hiệu lực ghi trong văn bản |
|---|---|---|
88 |
General T&C 6.0 | 08/12/2023 |
89 |
General T&C 7.0 | 21/02/2025 |
130 |
General T&C 8.0 | 08/06/2026 |
| id | Version | Effective date stated in the document |
|---|---|---|
88 |
General T&C 6.0 | 08/12/2023 |
89 |
General T&C 7.0 | 21/02/2025 |
130 |
General T&C 8.0 | 08/06/2026 |
🔴 Đừng lấy ngày trong văn bản làm ngày của căn. Ngày per-property nằm ở lastModify của
API, tức lúc căn đó chấp thuận, không phải lúc văn bản ra đời. Ví dụ 41 Lê Hy Cát chấp
thuận bản 7.0 ngày 02/02/2026 — 11 tháng sau khi bản đó hiệu lực.
🔴 Do not take the date in the document as the property's date. The per-property date sits in the API's lastModify, i.e. when that property accepted the version, not when the document was issued. For example, 41 Lê Hy Cát accepted version 7.0 on 02/02/2026 — 11 months after that version took effect.
Hợp đồng riêng của từng căn (APPA — Accommodation Property Participation Agreement) là
thứ đáng đọc nhất thì nút View và Download đều disabled: chỉ 305 (1371548) và 181 THT
(1705775) có APPA, và cả hai đều không mở được. Bốn căn còn lại không có APPA nào.
The most worth reading is each property's own contract (APPA — Accommodation Property Participation Agreement), but the View and Download buttons are both disabled: only 305 (1371548) and 181 THT (1705775) have an APPA, and neither can be opened. The other four properties have no APPA at all.
Nhưng danh sách phiên bản đã chấp thuận lại khoanh được vùng ngày tạo hồ sơ. Một căn chỉ phải chấp thuận những bản còn hiệu lực trong đời nó, nên bản CŨ NHẤT nó có nói lên nó ra đời lúc nào:
But the list of approved versions does narrow down the date the profile was created. A property only has to accept the versions still in effect during its lifetime, so the OLDEST version it has says when it came into being:
| Căn | Bản cũ nhất đã chấp thuận | ⇒ hồ sơ tạo trong khoảng |
|---|---|---|
alacarte305 |
6.0 (nhận 25/12/2024) | trước 21/02/2025 — căn duy nhất có mặt từ thời 6.0 |
181tohienthanh |
7.0 (nhận 19/01/2026) | 21/02/2025 → 19/01/2026 |
alacarte404 · alacarte502 · 15nuocman5 · 41lehycat |
7.0 (nhận 02/02/2026) | 21/02/2025 → 02/02/2026 |
25anthuong11 |
8.0 (nhận 18/09/2026) | sau 08/06/2026 → 18/09/2026 |
| Property | Oldest approved version | ⇒ profile created in the window |
|---|---|---|
alacarte305 |
6.0 (accepted 25/12/2024) | before 21/02/2025 — the only property present from the 6.0 era |
181tohienthanh |
7.0 (accepted 19/01/2026) | 21/02/2025 → 19/01/2026 |
alacarte404 · alacarte502 · 15nuocman5 · 41lehycat |
7.0 (accepted 02/02/2026) | 21/02/2025 → 02/02/2026 |
25anthuong11 |
8.0 (accepted 18/09/2026) | after 08/06/2026 → 18/09/2026 |
25anthuong11 không có bản 7.0 — nếu hồ sơ đã tồn tại thời 7.0 thì bắt buộc phải có. Đó
là bằng chứng độc lập cho thấy căn này sinh ra sau 08/06/2026, khớp với hotel id 96450982 cao
vọt so với sáu căn kia.
25anthuong11 has no 7.0 version — if the profile had existed in the 7.0 era, it would have to have one. That is independent evidence that this property was created after 08/06/2026, consistent with the hotel ID 96450982 being far higher than the six others.
⚠️ Bản 130 được cả sáu căn cũ nhận đúng ngày 08/06/2026 (305 lúc 13:12, năm căn kia
13:56) — trùng ngày hiệu lực, nên nhiều khả năng là đóng dấu hàng loạt tự động, không phải
host bấm. Vì vậy ngày của bản 130 chỉ chứng minh "căn đã tồn tại ngày 08/06/2026", không nói
gì thêm. Ngược lại 88 và 89 được nhận muộn hơn ngày hiệu lực cả năm → đó là hành vi thật.
⚠️ Version 130 was accepted by all six old properties on exactly 08/06/2026 (305 at 13:12, the other five at 13:56) — the same day it took effect, so it is most likely automatic bulk stamping, not the host clicking. So the date of version 130 only proves that "the property existed on 08/06/2026", and nothing more. By contrast, 88 and 89 were accepted well after their effective dates — that is real behaviour.
Nguồn thứ năm: hộp thư Gmail — mạnh hơn cả portalFifth source: the Gmail inbox — stronger than the portal
node scripts/gmail-read.mjs --search "<truy vấn Gmail>" đọc Gmail qua tab Chrome đã đăng
nhập, không cần OAuth, không cần 2FA. Hộp thư giữ thứ portal đã xoá.
node scripts/gmail-read.mjs --search "<Gmail query>" reads Gmail through the signed-in Chrome tab, with no OAuth and no 2FA needed. The inbox keeps what the portal has deleted.
Hai mốc mà portal không cho, Gmail cho:
Two dates the portal does not give, Gmail does:
- 📧
25anthuong11= 18/09/2026 19:41 — thưno-reply@notifications.agoda-messaging.comtiêu đề "Your property has been published! Let's get booking.", mở ra ghi đích danh "Dear 4BR Villa in An Thuong 500m to MyKhe Beach". Đây là Agoda tự khai ngày lên sóng, mạnh hơn mọi suy luận — nênactive_from_basisghideclared, không phảiobserved. Chỉ căn này có thư đó (tìmfrom:agoda "has been published"trả đúng 1 kết quả); sáu căn kia lên sóng trước khi Agoda có loại thông báo này. - 📧
181tohienthanh= 23/01/2026 02:01 — thư "Inquiry by YOUNGJAE YOON". Khách hỏi được thì listing đã hiển thị, mà mốc này sớm hơn đơn đầu tiên gần một tháng (19/02). Đã kiểm không có thư khách nào sớm hơn.
- 📧
25anthuong11= 18/09/2026 19:41 — email fromno-reply@notifications.agoda-messaging.com, subject "Your property has been published! Let's get booking.", which when opened names it directly: "Dear 4BR Villa in An Thuong 500m to MyKhe Beach". This is Agoda declaring the go-live date itself, stronger than any inference — soactive_from_basisis recorded asdeclared, notobserved. Only this property has that email (searchingfrom:agoda "has been published"returns exactly 1 result); the six other properties went live before Agoda had this type of notice. - 📧
181tohienthanh= 23/01/2026 02:01 — email "Inquiry by YOUNGJAE YOON". A guest can only ask if the listing is already showing, and this date is nearly a month earlier than the first booking (19/02). Checked: there is no earlier guest email.
Đối chiếu chéo: 305 có thư hỏi phòng lúc 06/03/2025 10:08 và yêu cầu đặt lúc 10:20
cùng sáng — khớp createdDate 06/03/2025 của giao dịch, tức hai nguồn độc lập cùng ra một
ngày. Thư "Welcome to Agoda" 25/12/2024 cũng khớp đúng contract_from của 305, xác nhận
cách đọc cột hợp đồng là đúng.
Cross-check: 305 had an inquiry email on 06/03/2025 at 10:08 and a booking request at 10:20 the same morning — matching the createdDate of 06/03/2025 on the transaction, so two independent sources point to the same day. The "Welcome to Agoda" email of 25/12/2024 also matches the contract_from of 305 exactly, confirming that the way the contract column is read is correct.
⚠️ Thư marketing nhắc tên căn KHÔNG phải bằng chứng lên sóng — Agoda gửi cho cả property
chưa bán được gì. 41lehycat được nhắc tên từ 08/07/2026 trong thư mời Mega Sale nhưng vẫn
chưa có dấu hiệu nào cho thấy nó từng bán. alacarte404 thì không thư nào nhắc tên.
⚠️ A marketing email naming the property is NOT evidence that it went live — Agoda sends them to every property, including ones that have sold nothing. 41lehycat has been named since 08/07/2026 in a Mega Sale invitation, but there is still no sign it has ever sold. alacarte404 has no email naming it at all.
🔴 Lịch KHÔNG phải kho lịch sử — đã thử và đã bác bỏ🔴 The calendar is NOT a history store — tested and rejected
Calendar/GetAvailability và GetRate nhận ngày quá khứ tuỳ ý và trả về đủ 365 ô, nên
rất dễ tưởng là lịch sử tồn kho. Không phải.
Calendar/GetAvailability and GetRate accept any past date and return all 365 cells, so it is easy to think it is an inventory history. It is not.
Phép thử bác bỏ: A La Carte 305 có đơn tạo 06/03/2025, khách ở 18/03/2025 — vậy mà quét
trọn năm 2025 trả 365 ngày đều remainingRoomNightsAvailable = 0, basePrice = null,
netRoomNightsBooked = 0. Quá khứ bị dọn sạch, không phải "chưa từng mở".
Test that disproves it: A La Carte 305 has a booking created 06/03/2025, with the guest staying 18/03/2025 — yet a full scan of 2025 returns 365 days all with remainingRoomNightsAvailable = 0, basePrice = null, netRoomNightsBooked = 0. The past has been wiped clean, not "never opened".
Dấu hiệu nhận ra cái bẫy mà không cần phép thử: sáu căn khác nhau cùng trả basePrice
bắt đầu đúng một ngày — 26/08/2026. Sáu listing mở bán ở sáu thời điểm khác nhau không thể
cùng có giá từ một ngày; đó là ngày cấu hình giá hiện hành, không phải ngày mở bán.
A sign that the trap is there, without running a test: six different properties all return a basePrice starting on exactly one date — 26/08/2026. Six listings going on sale at six different moments cannot all have a price starting from the same day; that is the date the current price configuration was set, not the date of going on sale.
Script vẫn quét lịch nhưng in dưới nhãn chẩn đoán và không cho nó tính active_from.
The script still scans the calendar, but prints the result under the label diagnostic, and is not allowed to calculate active_from from it.
period_type — đã chốt thêm một giá trịperiod_type — one more value confirmed
p3 khớp tuyệt đối số đơn trong fact_agoda_reservations cho cả bốn căn có đơn
(181 THT 10 · 15 NM5 3 · 502 1 · 305 0). Tức p3 đếm đúng tập mà Booking/list trả về.
Đối chiếu theo ngày nhận phòng thì ba cửa sổ 12 tháng · từ đầu năm · trọn đời cho cùng kết
quả nên chưa tách được ba khả năng đó — nhưng biết chắc p3 không phải "trọn lịch sử
giao dịch", vì 305 có 6 giao dịch từ 2025 mà p3 = 0.
p3 matches exactly the number of reservations in fact_agoda_reservations for all four properties that have reservations (181 THT 10 · 15 NM5 3 · 502 1 · 305 0). So p3 counts exactly the set that Booking/list returns. Checking by check-in date, the three windows 12 months · year to date · lifetime give the same result, so these three possibilities cannot yet be separated — but it is certain that p3 is not "the whole transaction history", because 305 has 6 transactions from 2025 while p3 = 0.
p0 (181 THT = 2) và p2 (181 THT = 5, 15 NM5 = 2) vẫn chưa khớp cửa sổ nào đã thử —
không khớp 7/30/90 ngày, 6/12 tháng, tháng này, từ đầu năm, theo cả ngày đặt lẫn ngày ở.
p0 (181 THT = 2) and p2 (181 THT = 5, 15 NM5 = 2) still do not match any window tried — not 7/30/90 days, not 6/12 months, not this month, not year-to-date, by either booking date or stay date.
Ba bẫy đã trả giá — đọc trước khi sửa scriptThree traps paid for — read before changing the script
① SearchTransactions mặc định phân trang MỘT DÒNG mỗi trang. Thiếu PageSize thì API
trả 1 dòng với totalPages: 17 và không báo lỗi gì. Dấu hiệu bắt được nó: nới rộng
khoảng ngày mà số dòng lại giảm. Luôn truyền PageSize và đối chiếu với totalPages.
① SearchTransactions pages by ONE ROW by default. If PageSize is missing, the API returns 1 row with totalPages: 17 and reports no error. The sign that catches it: widening the date range makes the row count drop. Always pass PageSize and check it against totalPages.
② Tên trường của Agoda khác Booking. checkinDate (i thường, không phải checkInDate),
roomNights cho sẵn (không phải tự tính từ hai ngày), không có trường tiền trong đơn. Đoán
theo thói quen Booking thì bảng vẫn ra đủ dòng — nhưng mọi cột đều rỗng trừ booking_id.
② Agoda's field names differ from Booking's. checkinDate (lowercase i, not checkInDate), roomNights is provided (not calculated from two dates), and there is no money field in the reservation. Guessing from Booking's habits would still fill the table with rows — but every column is empty except booking_id.
③ Review gọi trần trả rỗng. Phải để trang tự gọi rồi bắt ở tầng mạng qua chrome-grab.
Trang 181 THT ghi "5 reviews" mà API trả 4 — chênh lệch này chưa giải thích được.
③ Review calls on the cap return empty. The page has to make the call itself, and the network layer has to catch it via chrome-grab.
The 181 THT page says "5 reviews" but the API returns 4 — the difference is not yet explained.
Chưa làmNot done yet
period_type0 · 2 · 3 chưa giải mã. Cả ba chỉ số (bookings·revenue·room_nights) đều có đủ 4 kỳ, tức 84 dòng thì 63 dòng chưa biết cửa sổ. Cách chốt: đối chiếu từng giá trị với nhãn trên dashboard, đúng như đã làm với1.- Chuỗi theo ngày mới có một mốc. Lùi tối đa 30 ngày nên lịch sử dài chỉ tích luỹ được bằng cách cào hằng tuần — bỏ một tuần là đứt đoạn vĩnh viễn, không cào bù được.
- Không có phễu hiển thị / CTR. Đã dò cả 27 trang trong
PrivateLayout/Main: không trang nào trả lượt hiện ra, lượt bấm hay CTR. Nên không so được khả năng thu hút khách giữa hai kênh — chỉ so được kết quả bán. GetTopCompetitorstrả comp set rỗng cho mọi căn (isCompetitorsTracked: false) — chưa rõ phải bật ở đâu.- Chưa dò Calendar (occupancy · RevPAR) và Campaigns / Growth.
period_type0 · 2 · 3 not yet decoded. All three metrics (bookings·revenue·room_nights) have all 4 periods, so out of 84 rows 63 rows do not yet have a known window. How to finalise: match each value against the label on the dashboard, exactly as was done for1.- The daily series has only one anchor point. It goes back at most 30 days, so a long history can only build up by scraping weekly — missing one week is a permanent gap that cannot be backfilled.
- No display funnel / CTR. I probed all 27 pages in
PrivateLayout/Main: no page returns impressions, clicks or CTR. So the ability to attract guests cannot be compared between the two channels — only the sales result can be compared. GetTopCompetitorsreturns an empty comp set for every property (isCompetitorsTracked: false) — not yet clear where it has to be turned on.- Calendar (occupancy · RevPAR) and Campaigns / Growth not yet probed.
agoda_ranking — thứ hạng trên trang tìm kiếm CÔNG KHAI (thêm 26/09/2026)agoda_ranking — ranking on the PUBLIC search page (added 26/09/2026)
Tên bảng do user đặt (không theo tiền tố fact_). Nguồn: node scripts/ota-agoda-search-rank.mjs --anon (phát lại GraphQL citySearch của agoda.com) + trạng thái mở bán từ ari/Calendar/GetAvailability + sức chứa từ ChildRate/getroombypropertyId. Chỉ thêm, không sửa. Chi tiết lượt đầu: ../audits/2026-09-26-agoda-search-rank.md.
The table names were set by the user (they do not follow the fact_ prefix). Source: node scripts/ota-agoda-search-rank.mjs --anon (replays the GraphQL citySearch of agoda.com) + sale status from ari/Calendar/GetAvailability + capacity from ChildRate/getroombypropertyId. Append-only, never edited. Details of the first run: ../audits/2026-09-26-agoda-search-rank.md.
| Cột | Nghĩa |
|---|---|
search_id · pass_no |
mã tìm kiếm trong lượt đo (A–D) · lượt 1/2 — Agoda xếp lại mỗi trang nên phải đo ≥2 lượt |
city_id · checkin · checkout · nights · adults · rooms |
bộ lọc khách nhập |
sort · personalization |
best_match · anon = đã xoá searchHistory (vẫn đăng nhập) |
total_filtered · rows_scanned · unique_ids |
tổng Agoda báo · số dòng đã duyệt · số id khác nhau (rows_scanned > unique_ids = trùng do xếp lại) |
rank · page_approx · pct_from_top |
vị trí đầu tiên gặp · trang (~49 dòng/trang) · % tính từ đầu — có thể >100 % vì dòng trùng |
status |
ranked · not_found (mở bán, đủ sức chứa mà không thấy) · not_open (lịch không mở đủ các đêm) · over_capacity (khách > sức chứa) · grouped_under_84463577 (404 không có dòng riêng, hiện chung nhóm với 502) |
agoda_bookings_confirmed |
số đơn xác nhận trong postbook/Booking/list lúc đo (305: danh sách chỉ trả 1 dù có giao dịch từ 03/2025) |
note |
ghi chú dòng |
| Column | Meaning |
|---|---|
search_id · pass_no |
search ID within the measurement run (A–D) · pass 1/2 — Agoda reorders each page, so at least 2 passes must be measured |
city_id · checkin · checkout · nights · adults · rooms |
the guest filters entered |
sort · personalization |
best_match · anon = search history deleted (still signed in) |
total_filtered · rows_scanned · unique_ids |
total Agoda reports · rows scanned · distinct IDs (rows_scanned > unique_ids = duplicates from reordering) |
rank · page_approx · pct_from_top |
first position found · page (~49 rows per page) · % counted from the top — can exceed 100% because of duplicate rows |
status |
ranked · not_found (on sale, enough capacity, but not seen) · not_open (calendar does not open all nights) · over_capacity (guests > capacity) · grouped_under_84463577 (404 has no separate row; it appears under the group with 502) |
agoda_bookings_confirmed |
number of confirmed bookings in postbook/Booking/list at the time of measurement (305: the list returns only 1, even though there were transactions from 03/2025) |
note |
note on the row |
⚠️ Dòng alacarte502 có status = ranked là thứ hạng của cả nhóm 502 + 404 (An Hai Bac Houses), không riêng căn 502.
⚠️ The alacarte502 row with status = ranked is the ranking of the whole group 502 + 404 (An Hai Bac Houses), not of property 502 alone.