This document describes the website traffic analytics implementation for lzwjava.github.io. The site uses Cloudflare Insights (formerly Cloudflare Web Analytics) as its primary analytics service, with a previously-used Google Analytics integration now disabled.
For information about other external service integrations, see CDN Resources and Favicons and Web Manifest.
The analytics system loads via a single JavaScript beacon from Cloudflare's CDN. The integration follows a client-side, privacy-respecting approach that requires no cookies or persistent identifiers.
Sources: _site/notes/2025-12-06-unpopular-relationship-opinions-en.html14-16 _site/list-en.html14-16 _site/human-wiring-priorities-zh.html14-16
The analytics beacon appears identically across all generated HTML pages in the _site/ directory. The script element uses the following structure:
Key attributes:
defer: Ensures script loads asynchronously without blocking page renderingsrc: Points to Cloudflare's hosted beacon scriptdata-cf-beacon: JSON configuration containing the site-specific authentication tokenThe token 70fc8c466cc1445098b3fc6f209c22c2 uniquely identifies this site's analytics account within Cloudflare's system.
Sources: _site/notes/2025-12-06-unpopular-relationship-opinions-en.html14-16 _site/unpopular-relationship-opinions-en.html14-16 _site/guangzhou-travel-guide-en.html14-16
Analytics tracking applies uniformly across all page types in the site architecture:
| Page Type | Example File | Analytics Enabled |
|---|---|---|
| Root-level pages | _site/list-en.html | ✓ |
| Dated notes | _site/notes/2025-12-06-unpopular-relationship-opinions-en.html | ✓ |
| Chinese versions | _site/list-zh.html, _site/yin-wang-zh.html | ✓ |
| English versions | _site/list-en.html, _site/yin-wang-en.html | ✓ |
| Topic pages | _site/guangzhou-travel-guide-en.html | ✓ |
| Blog directories | _site/blogs-zh.html | ✓ |
All pages in the _site/ directory contain the identical analytics beacon implementation, ensuring complete traffic visibility across both language variants and all content types.
Sources: _site/list-en.html14-16 _site/notes/2025-12-06-unpopular-relationship-opinions-en.html14-16 _site/list-zh.html14-16 _site/yin-wang-zh.html14-16 _site/blogs-zh.html14-16
A Google Analytics Universal Analytics implementation exists in the codebase but is disabled via HTML comments. The implementation appears immediately after the Cloudflare Insights script in the <head> section:
Configuration details:
UA-66656236-1 (Universal Analytics property)The UA- prefix indicates this is a Universal Analytics property, which Google deprecated in July 2023. The continued presence of this code suggests either:
Sources: _site/notes/2025-12-06-unpopular-relationship-opinions-en.html18-26 _site/list-en.html18-26 _site/yin-wang-zh.html18-26
The following diagram illustrates how analytics events flow from user interactions through the Cloudflare network to the analytics dashboard:
Sources: _site/notes/2025-12-06-unpopular-relationship-opinions-en.html14-16 _site/list-en.html14-16
The analytics script appears in every generated HTML file, indicating integration at the Jekyll template level rather than individual markdown files. Jekyll v3.10.0 processes templates to inject the analytics beacon into all output pages.
Expected template location (not visible in provided files, but inferred):
_includes/ directory as a reusable partial_layouts/default.html or similar layout fileBuild-time injection pattern:
Source Markdown → Jekyll Processing → HTML Output
↓
Analytics Beacon Injection
↓
_site/*.html (all pages include beacon)
Sources: _site/notes/2025-12-06-unpopular-relationship-opinions-en.html14-16 _site/list-en.html14-16 _site/unpopular-relationship-opinions-en.html14-16
The analytics token 70fc8c466cc1445098b3fc6f209c22c2 is:
This follows standard analytics implementation practices where tokens enable data submission but not dashboard access.
Sources: _site/notes/2025-12-06-unpopular-relationship-opinions-en.html15 _site/list-en.html15
The defer attribute on the analytics script ensures optimal page load performance:
| Loading Strategy | Parse Blocking | Execution Timing | Impact on FCP* |
|---|---|---|---|
| No defer/async | Yes | Immediate | High (blocks rendering) |
| async | No | As soon as loaded | Medium (can delay onload) |
| defer (current) | No | After DOM parsing | Low (non-blocking) |
*First Contentful Paint
The deferred loading strategy means:
Sources: _site/notes/2025-12-06-unpopular-relationship-opinions-en.html14 _site/list-en.html14
The beacon script loads from static.cloudflareinsights.com, leveraging Cloudflare's global CDN infrastructure:
Performance benefits:
Sources: _site/notes/2025-12-06-unpopular-relationship-opinions-en.html14 _site/list-en.html14
The analytics implementation provides complete visibility across the site's bilingual structure:
The single token configuration means:
/list-en vs /list-zh)languageSelect dropdown (see Language Selector Implementation)Sources: _site/list-en.html14-16 _site/list-zh.html14-16 _site/yin-wang-en.html14-16 _site/yin-wang-zh.html14-16
| Feature | Cloudflare Insights (Active) | Google Analytics (Disabled) |
|---|---|---|
| Script | beacon.min.js | gtag.js |
| Token/ID | 70fc8c466cc1445098b3fc6f209c22c2 | UA-66656236-1 |
| Status | Enabled | Commented out |
| Privacy | Cookie-free, no PII | Cookies required |
| GDPR | Compliant by default | Requires consent management |
| Loading | defer attribute | async attribute |
| Platform | Cloudflare-exclusive | Google Cloud |
| Analytics Type | Web traffic only | Full GA suite (deprecated) |
The migration to Cloudflare Insights aligns with:
Sources: