Conversion Tracking Doctor - GA4, Meta CAPI & GTM Diagnostics
Diagnose broken conversion tracking and data quality across GA4, Ads and Meta CAPI.
No hosted demo for this project — it runs locally. See install instructions below.
Discuss This Project on WhatsAppOverview
Conversion Tracking Doctor is a Python diagnostic engine that audits conversion tracking implementations across Google Analytics 4, Google Ads, Meta Conversions API and Google Tag Manager. It runs six analyzers, detects unhashed PII leakage, checks deduplication and generates corrective GTM and CAPI code snippets.

Problem It Solves
Conversion tracking breaks silently: duplicate event firings, lost attribution from ad blockers and iOS 14.5, and PII leaks in URL parameters make advertising optimization blind and can expose sensitive customer data.
Target Users
- Performance marketers
- Agencies and media buyers
- CRO and analytics teams
Key Features
- Six analyzers covering GA4, Google Ads, Meta CAPI and GTM
- Unhashed PII detection in query parameters and events
- Deduplication and duplicate firing checks
- GTM and CAPI corrective code generation
- Interactive HTML report output
- CI with ruff, mypy and pytest
Technologies
- Python
- Typer
- FastAPI
- Pydantic
- pytest
Contribution & Skills
Sole author. Built the analyzer framework, PII detection heuristics, deduplication logic, code-generation templates and HTML report renderer.
Install & Usage
Install
git clone https://github.com/hamid-digitalmarketer/conversion-tracking-doctor.git
cd conversion-tracking-doctor
pip install -e ".[dev]"Run an audit
conversion-doctor audit
conversion-doctor audit --open-browserFAQ
What does a tracking audit detect?
It detects duplicate conversions, missing or conflicting event IDs, unhashed PII in URLs, and configuration gaps between GA4, Google Ads and Meta CAPI.
Can it fix tracking automatically?
It generates corrective code snippets and recommendations rather than modifying your live tag manager. A human applies the fixes.
Related Projects
Meta Adsmeta-lead-quality-analyzer
Score Meta lead quality and feed offline conversions back to the algorithm.
Google Ads & PPCppc-waste-detector
Find wasted ad spend: query bleed, cannibalization, junk placements and click fraud.
AI & Automationai-marketing-mix-copilot
Bayesian media-mix modeling with causal incrementality and budget simulation.
Need Help With conversion-tracking-doctor or Similar Tooling?
I build custom MarTech tools, audits and automation for teams. Start the conversation on WhatsApp.
Contact Me on WhatsApp