Skip to content

Analytics

Garot Conklin edited this page Jun 1, 2026 · 2 revisions

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.


What is tracked

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).


Configuration

The Measurement ID lives in config/sources.yaml:

analytics:
  measurement_id: "G-58PDJM14L7" # GA4 — set to "" to disable

To disable analytics entirely: set measurement_id: "" and re-run the pipeline (python3 main.py) to regenerate the HTML files without the tracking snippet.


Where the snippet is injected

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.


GA4 property details

Field Value
Property name Signal
Stream name Signal
Stream URL https://flexrpl.github.io/signal
Measurement ID G-58PDJM14L7
Stream ID 14916932710

Viewing analytics data

  1. Go to analytics.google.com
  2. Select the Signal property
  3. 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.


Updating the Measurement ID

If the GA4 property is ever recreated or migrated:

  1. Get the new G-XXXXXXXXXX ID from the GA4 console (Admin → Data Streams → your stream)

  2. Update config/sources.yaml:

    analytics:
      measurement_id: "G-NEWID"
  3. Re-run the pipeline to regenerate all HTML files

    python3 main.py --collect-only   # fastest way — skips analysis, just rebuilds HTML

    Or run a full daily pipeline:

    python3 main.py
  4. 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

Clone this wiki locally