← Back to all products
$29
Heatmap Integrator
Heatmap integration toolkit for click tracking, scroll depth, and attention mapping on landing pages.
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
heatmap-integrator/
├── LICENSE
├── README.md
├── examples/
│ ├── events.csv
│ └── heatmap_config.json
├── free-sample.zip
├── guide/
│ ├── 01_features.md
│ ├── 02_cli-reference.md
│ └── 03_examples.md
├── index.html
└── src/
└── heatmap_integrator.py
📖 Documentation Preview README excerpt
Heatmap Integrator
Part of the Landing Lab by CodeVault
Generate lightweight heatmap tracking code for your landing pages, then analyze the collected click and scroll data locally. Includes a <3KB JavaScript snippet generator and a Python analyzer for click hotspots, element tracking, scroll depth milestones, and device breakdowns.
Features
- Generate a self-contained tracking JavaScript snippet (<3KB)
- Click tracking with element identification (tag, id, class)
- Scroll depth milestone tracking (25%, 50%, 75%, 90%, 100%)
- Batch event sending with
sendBeaconfor reliability - Click hotspot analysis with grid-based heatmap data
- Most-clicked element ranking
- Device breakdown (mobile/tablet/desktop)
- Click zone distribution (top/middle/bottom)
- Session-level scroll depth analysis
- Configurable sampling rate and throttling
- Text and JSON report output
- Python stdlib only — zero pip dependencies
Quick Start
# Generate the tracking snippet
python src/heatmap_integrator.py --generate-tracker --output tracker.html
# Generate with custom config
python src/heatmap_integrator.py --config examples/heatmap_config.json --generate-tracker
# Analyze collected event data
python src/heatmap_integrator.py --analyze examples/events.csv --report
# Scroll depth analysis only
python src/heatmap_integrator.py --analyze examples/events.csv --scroll-depth
# JSON output
python src/heatmap_integrator.py --analyze examples/events.csv --report --format json
CLI Reference
| Flag | Description |
|---|---|
--config, -c | Path to tracker config JSON |
--generate-tracker | Generate tracking JS snippet |
--analyze | Path to events CSV file to analyze |
--report | Generate full analysis report |
--scroll-depth | Analyze scroll depth only |
--clicks-only | Analyze clicks only |
--output, -o | Output file |
--format, -f | Output format: text or json |
--verbose, -v | Enable verbose logging |
Configuration
See examples/heatmap_config.json for tracker configuration and examples/events.csv for the expected event data format.
Examples
... continues with setup instructions, usage examples, and more.
📄 Code Sample .py preview
src/heatmap_integrator.py
#!/usr/bin/env python3
"""
Heatmap Integrator — Landing Lab by DataNest
Generate heatmap tracking code for your landing pages, analyze click
data and scroll depth from session logs, and produce visual heatmap
reports. Includes JavaScript snippet generation for click/scroll
tracking and a Python analyzer for the collected data.
Why this exists:
Heatmap SaaS tools charge $30-100/month and add 200KB+ of JavaScript
to your page. If you just need to know where people click and how
far they scroll, this tool generates a <3KB tracking snippet and
analyzes the data locally.
Usage:
python heatmap_integrator.py --generate-tracker --output tracker.html
python heatmap_integrator.py --analyze clicks.csv --report
python heatmap_integrator.py --analyze clicks.csv --scroll-depth
python heatmap_integrator.py --config heatmap.json --generate-tracker
License: MIT
"""
from __future__ import annotations
import argparse
import csv
import json
import logging
import sys
from collections import Counter, defaultdict
from dataclasses import dataclass, field
from pathlib import Path
from typing import Any
# ---------------------------------------------------------------------------
# Constants
# ---------------------------------------------------------------------------
LOG = logging.getLogger("heatmap-integrator")
# Screen width breakpoints for device categorisation
BREAKPOINTS: dict[str, tuple[int, int]] = {
"mobile": (0, 767),
"tablet": (768, 1023),
"desktop": (1024, 9999),
}
# Scroll depth milestones to track (percentages)
# ... 536 more lines ...