Traffic Discovery and Production Monitoring
Reduces duplicate telemetry requests, reserves more of the D1 free tier, completes article-view retention and multilingual SEO signals, and adds a low-frequency production smoke check.
# Traffic Discovery and Production Monitoring
This update connects visitor measurement, search-engine understanding, and production failure detection into a more reliable path without changing the site's visual design or normal browsing flow.
## More accurate search entry points
- The sitemap always emits the canonical production origin instead of copying whichever alias host requested it.
- Home uses the latest published-content date rather than pretending it changed on every crawl.
- Home, the Japanese learning tool, and every public article declare Chinese, English, Japanese, and default-language counterparts.
- Direct article pages now include author, publisher, and language-alternate metadata.
## Free-tier protection with real headroom
- A first visit no longer sends separate identify and page-view requests; the page view already establishes the anonymous identity and visitor profile.
- The browser suppresses repeat clicks on the same target within one second, avoiding needless Pages Functions requests and D1 rate-limit writes.
- Default D1 warning and hard thresholds move from 60,000 / 80,000 to 30,000 / 50,000 estimated rows. Hard mode stops page and click telemetry and keeps only a 10% article-view sample, reserving at least half of the free write allowance for sign-in, saves, Chat, Transfer, and Whiteboard. Only untouched legacy defaults migrate; administrator custom settings remain unchanged.
- The 180-day cleanup now covers page, click, and article-view events and continues in bounded background batches from the health check.
## Earlier production failure detection
A low-request GitHub smoke check runs after successful release verification and every 12 hours. It checks API and D1 health, Home, the sitemap, one direct article page, and an immutable hashed asset. Temporary deployment propagation is retried within a bound; sustained failures fail the task clearly. The permanent www redirect and real-user performance monitoring still require separate Cloudflare Dashboard configuration and verification, so this repository change does not claim they are enabled.