Telemetry Discrepancy Estimator for Regional Publishers
Estimate pageview discrepancies between first-party server logs and client analytics. A discrepancy is not proof of ad-blocking or revenue loss.
Problem it addresses
Build an open-source telemetry discrepancy estimator: 1) an optional same-origin pageview beacon that sends only after explicit analytics consent, 2) a Python log analyzer that compares server and client event counts, and 3) guidance for interpreting discrepancies. Differences may result from consent choices, JavaScript failures, sampling, caching, bots, or blockers; the tool cannot identify the cause by itself.
Who it is for
PRO operating in high-growth e-commerce, digital publishing, and direct-response marketing across Saudi Arabia, UAE, and Egypt.
What is inside
Key files listed in the README repository architecture:
docs/reverse-proxy-guide.mdexamples/sample_access_logs.txtLICENSEREADME.mdreports/loss_analysis.htmlsrc/audit_loss.pysrc/beacon_test.js (Node tests for consent and same-origin safeguards)src/telemetry_beacon.jssrc/telemetry_loss_estimator.pytests/test_audit.pytests/test_estimator.py
How to evaluate and use it
- Read the README first and confirm that the documented problem matches your use case.
- Inspect the listed files to find the data, tools, templates, and tests relevant to your task.
- Follow the repository’s Quick Start and check prerequisites before running commands.
- Compare outputs with documented examples and review limitations before using them in a decision or client workflow.
Quick Start from the README: python -m unittest discover -s tests · python src/audit_loss.py --help
Scope and limitations
- Consent-Gated Beacon: Sends a minimal pageview event to a configured same-origin endpoint only when the host page explicitly sets window.__analyticsConsent = true. It does not attempt to evade blockers or identify a person.
- Interpretation: Do not infer regional ad-blocker penetration from the sample logs. Use consented, account-specific measurements and describe the result as a tracking discrepancy unless the cause is independently established.
- Privacy Respect: Script strictly measures aggregated loss metrics without tracking personal identifiers or circumventing client browser privacy settings.
This page summarizes the available documentation; it does not establish performance or business results. Verify data and prerequisites before use.