MAHMOUD ABDELNABY
Reporting · CLI SCRIPT · 2

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.md
  • examples/sample_access_logs.txt
  • LICENSE
  • README.md
  • reports/loss_analysis.html
  • src/audit_loss.py
  • src/beacon_test.js (Node tests for consent and same-origin safeguards)
  • src/telemetry_beacon.js
  • src/telemetry_loss_estimator.py
  • tests/test_audit.py
  • tests/test_estimator.py

How to evaluate and use it

  1. Read the README first and confirm that the documented problem matches your use case.
  2. Inspect the listed files to find the data, tools, templates, and tests relevant to your task.
  3. Follow the repository’s Quick Start and check prerequisites before running commands.
  4. 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.

Related repositories