← Back to all products
$29
Newsletter Analytics
Track newsletter performance with open rates, click-through rates, bounces, and engagement trends.
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
newsletter-analytics/
├── LICENSE
├── README.md
├── examples/
│ └── sample_campaigns.json
├── free-sample.zip
├── guide/
│ ├── 01_features.md
│ ├── 02_quick-start.md
│ ├── 03_industry-benchmarks.md
│ └── 04_faq.md
├── index.html
└── src/
└── newsletter_analytics.py
📖 Documentation Preview README excerpt
Newsletter Analytics
Track and analyze newsletter performance: open rates, click-through rates, bounces, subscriber engagement, and trends over time. Import from Mailchimp, ConvertKit, or SendGrid.
Features
- Flexible campaign import — Maps fields from Mailchimp, ConvertKit, and SendGrid exports
- Performance reports — Open rate, click rate, bounce rate, unsubscribe rate per campaign
- Industry benchmarks — Compare your metrics against tech/SaaS averages
- Engagement scoring — Score subscribers by open/click frequency
- Subject line analysis — Identify patterns in your best-performing subjects
- Trend detection — Track metric changes over time
- JSON data storage — Portable, no database required
Requirements
- Python 3.10+
- No external dependencies (stdlib only)
Quick Start
# Import campaign data
python src/newsletter_analytics.py import --file examples/sample_campaigns.json
# Generate a report for all campaigns
python src/newsletter_analytics.py report
# Report for a specific campaign
python src/newsletter_analytics.py report --campaign "March Newsletter"
# Analyze subject lines
python src/newsletter_analytics.py subjects
# View engagement scores
python src/newsletter_analytics.py engagement
# View trends over the last 30 days
python src/newsletter_analytics.py trends --last 30
Import Format
The tool accepts JSON with flexible field mapping:
[
{
"campaign_name": "March Newsletter",
"sent_at": "2026-03-01T10:00:00Z",
"total_sent": 5000,
"opens": 1200,
"clicks": 150,
"bounces": 25,
"unsubscribes": 10,
"complaints": 1,
"subject": "What we shipped in February"
}
]
... continues with setup instructions, usage examples, and more.
📄 Code Sample .py preview
src/newsletter_analytics.py
#!/usr/bin/env python3
"""
Newsletter Analytics — Email Arsenal (DataNest)
Track and analyze newsletter performance metrics: open rates, click-through
rates, bounces, subscriber engagement, and trends over time.
Usage:
python newsletter_analytics.py import --file campaign_data.json
python newsletter_analytics.py report
python newsletter_analytics.py report --campaign "March Newsletter"
python newsletter_analytics.py trends --last 30
Dependencies: Python 3.10+ stdlib only
License: MIT
"""
from __future__ import annotations
import argparse
import json
import logging
import math
import statistics
import sys
from collections import Counter, defaultdict
from dataclasses import asdict, dataclass, field
from datetime import datetime, timedelta, timezone
from pathlib import Path
from typing import Any
# ---------------------------------------------------------------------------
# Constants
# ---------------------------------------------------------------------------
logger = logging.getLogger("newsletter_analytics")
DATA_FILE = Path("newsletter_data.json")
# Industry benchmarks (approximate averages for tech/SaaS newsletters)
BENCHMARKS = {
"open_rate": 0.215, # 21.5%
"click_rate": 0.025, # 2.5%
"bounce_rate": 0.005, # 0.5%
"unsubscribe_rate": 0.002, # 0.2%
"complaint_rate": 0.0003, # 0.03%
}
# ---------------------------------------------------------------------------
# ... 468 more lines ...