← Back to all products

Conversion Tracker

$19

Lightweight conversion tracking with goal setup, event logging, and conversion rate dashboards.

📁 10 files
JSONMarkdownPython

📄 Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample

📁 File Structure 10 files

conversion-tracker/ ├── LICENSE ├── README.md ├── examples/ │ ├── events.csv │ └── goals.json ├── free-sample.zip ├── guide/ │ ├── 01_features.md │ ├── 02_cli-reference.md │ └── 03_examples.md ├── index.html └── src/ └── conversion_tracker.py

📖 Documentation Preview README excerpt

Conversion Tracker

Part of the Landing Lab by CodeVault

Track conversions across your landing page funnel: define goals, capture events, analyze funnel drop-off, and attribute revenue to traffic sources with first-touch, last-touch, and linear models. All from a simple CSV event log.

Features

  • Define multiple conversion goals with revenue values
  • Funnel analysis showing drop-off at each step
  • Three attribution models: first-touch, last-touch, linear
  • Goal completion summaries with conversion rates
  • CSV event log processing (works with any analytics export)
  • Text and JSON report output
  • Python stdlib only — zero pip dependencies

Quick Start


# Generate a full conversion report
python src/conversion_tracker.py --goals examples/goals.json --events examples/events.csv --report

# Funnel analysis only
python src/conversion_tracker.py --goals examples/goals.json --events examples/events.csv --funnel

# Attribution analysis (first-touch model)
python src/conversion_tracker.py --goals examples/goals.json --events examples/events.csv --attribution --model first-touch

# JSON output for programmatic use
python src/conversion_tracker.py --goals examples/goals.json --events examples/events.csv --report --format json

CLI Reference

FlagDescription
--goals, -gPath to goals JSON config (required)
--events, -ePath to events CSV file (required)
--reportGenerate a full conversion report
--funnelShow funnel analysis only
--attributionShow attribution analysis only
--model, -mAttribution model: first-touch, last-touch, linear
--format, -fOutput format: text or json
--verbose, -vEnable verbose logging

Configuration

See examples/goals.json for goal definitions and examples/events.csv for the expected event log format.

Examples

Analyze which traffic sources actually drive signups:


python src/conversion_tracker.py --goals examples/goals.json --events examples/events.csv --attribution --model last-touch

License

MIT — See LICENSE file.

📄 Code Sample .py preview

src/conversion_tracker.py #!/usr/bin/env python3 """ Conversion Tracker — Landing Lab by DataNest Track conversions across your landing page funnel: define goals, set up funnel steps, capture events, and analyze attribution with first-touch and last-touch models. Outputs funnel reports showing drop-off at each step and overall conversion rates. Why this exists: Google Analytics gives you data overload. You don't need 200 reports — you need to know where visitors drop off in your funnel and which traffic sources actually convert. This tool does exactly that from a simple event log. Usage: python conversion_tracker.py --goals goals.json --events events.csv --report python conversion_tracker.py --goals goals.json --events events.csv --funnel python conversion_tracker.py --goals goals.json --events events.csv --attribution License: MIT """ from __future__ import annotations import argparse import csv import json import logging import sys from collections import defaultdict from dataclasses import dataclass, field from datetime import datetime from pathlib import Path from typing import Any # --------------------------------------------------------------------------- # Constants # --------------------------------------------------------------------------- LOG = logging.getLogger("conversion-tracker") ATTRIBUTION_MODELS = ("first-touch", "last-touch", "linear") # --------------------------------------------------------------------------- # Data Models # --------------------------------------------------------------------------- @dataclass # ... 437 more lines ...
Buy Now — $19 Back to Products