-
Notifications
You must be signed in to change notification settings - Fork 0
Analytics
Signal uses Google Analytics 4 (GA4) to track page views and visitor behavior across the published site. Analytics are configured in a single place and automatically injected into every generated HTML page.
GA4 Enhanced Measurement is enabled, which automatically captures:
| Event | What it measures |
|---|---|
| Page views | Every visit to any report, the landing page, or the archive |
| Scroll depth | How far down each report visitors read |
| Outbound clicks | Links clicked out to external sources |
| Session duration | Time spent on each page |
| Geography | Country/region of visitors |
| Referrers | How people found the site (direct, search, social, etc.) |
No personally-identifiable information is collected. No cookies are set for consent-mode purposes (this is a personal, non-commercial site).
The Measurement ID lives in config/sources.yaml:
analytics:
measurement_id: "G-58PDJM14L7" # GA4 — set to "" to disableTo disable analytics entirely: set measurement_id: "" and re-run the pipeline (python3 main.py) to regenerate the HTML files without the tracking snippet.
The GA4 script tag is added to the <head> of every generated HTML surface:
| Page | Generated by |
|---|---|
Daily intelligence briefs (reports/brief_*.html) |
pipeline/reporter.py → generate_report() |
Weekly intelligence briefs (reports/weekly_*.html) |
pipeline/reporter.py → generate_weekly_report() |
Landing page (index.html) |
main.py → _update_index() |
Archive page (archive.html) |
main.py → _update_index() |
The snippet is built by ga_snippet(measurement_id) in reporter.py. It returns an empty string if no ID is configured, so disabling analytics requires no code changes — only the config value.
| Field | Value |
|---|---|
| Property name | Signal |
| Stream name | Signal |
| Stream URL | https://flexrpl.github.io/signal |
| Measurement ID | G-58PDJM14L7 |
| Stream ID | 14916932710 |
- Go to analytics.google.com
- Select the Signal property
- Navigate to Reports → Realtime for live traffic, or Reports → Engagement → Pages and screens for historical page view data
Note: GA4 typically shows a "Data collection isn't active" warning for the first 24–48 hours after installation. This is normal — it clears once Google processes the first events.
If the GA4 property is ever recreated or migrated:
-
Get the new
G-XXXXXXXXXXID from the GA4 console (Admin → Data Streams → your stream) -
Update
config/sources.yaml:analytics: measurement_id: "G-NEWID"
-
Re-run the pipeline to regenerate all HTML files
python3 main.py --collect-only # fastest way — skips analysis, just rebuilds HTMLOr run a full daily pipeline:
python3 main.py
-
Commit and push:
git add reports/ index.html archive.html config/sources.yaml git commit -m "config: update GA4 measurement ID" git push origin main
Signal · Repository · fleXRPL · Daily political intelligence — powered by local AI