← Back to all products

CTA Optimizer

$19

CTA optimization toolkit with button text testing, placement analysis, and click-through tracking.

📁 9 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 9 files

cta-optimizer/ ├── LICENSE ├── README.md ├── examples/ │ └── cta_config.json ├── free-sample.zip ├── guide/ │ ├── 01_features.md │ ├── 02_cli-reference.md │ └── 03_examples.md ├── index.html └── src/ └── cta_optimizer.py

📖 Documentation Preview README excerpt

CTA Optimizer

Part of the Landing Lab by CodeVault

Analyze and optimize your Call-to-Action buttons. Scores CTA text for action-word strength, measures colour contrast against WCAG accessibility standards, evaluates button placement, and benchmarks click-through rates against industry averages.

Features

  • CTA text scoring: power words, weak words, length, verb-first, personalisation
  • WCAG 2.1 colour contrast checking (AA and AAA compliance)
  • Button placement evaluation across 10 common zones
  • Industry CTR benchmarking (SaaS, e-commerce, lead gen, newsletter)
  • Overall weighted score with grade (0-100)
  • Config file or inline CLI mode
  • Text and JSON report output
  • Python stdlib only — zero pip dependencies

Quick Start


# Analyze a CTA from a config file
python src/cta_optimizer.py --config examples/cta_config.json --analyze

# Quick inline analysis
python src/cta_optimizer.py --text "Start My Free Trial" --bg-color "#FF6B00" --fg-color "#FFFFFF"

# Contrast check only
python src/cta_optimizer.py --text "Sign Up" --bg-color "#FFAB00" --fg-color "#000000" --contrast-only

# JSON output
python src/cta_optimizer.py --config examples/cta_config.json --format json

CLI Reference

FlagDescription
--config, -cPath to CTA config JSON file
--text, -tCTA button text to analyze
--bg-colorButton background colour (hex, default: #FF6B00)
--fg-colorButton text colour (hex, default: #FFFFFF)
--page-bgPage background colour (hex, default: #FFFFFF)
--placementButton placement zone (default: above-fold)
--industryIndustry for benchmarks: saas, ecommerce, lead_gen, newsletter, general
--ctrCurrent CTR percentage (for benchmarking)
--analyzeRun full analysis
--contrast-onlyOnly check colour contrast
--format, -fOutput format: text or json
--verbose, -vEnable verbose logging

Configuration

See examples/cta_config.json for a complete example.

Examples

Compare two CTA variations:


python src/cta_optimizer.py --text "Submit" --placement footer
python src/cta_optimizer.py --text "Start My Free Trial Now" --placement hero

*... continues with setup instructions, usage examples, and more.*

📄 Code Sample .py preview

src/cta_optimizer.py #!/usr/bin/env python3 """ CTA Optimizer — Landing Lab by DataNest Analyze and optimize your Call-to-Action buttons. Scores CTA text for action-word strength, measures color contrast against WCAG standards, evaluates button placement positions, and benchmarks click-through rates against industry averages. Why this exists: Your CTA button is the single most important element on your landing page. The difference between "Submit" and "Start My Free Trial" can be a 30% lift in conversions. This tool gives you data-backed recommendations instead of guesswork. Usage: python cta_optimizer.py --config cta.json --analyze python cta_optimizer.py --text "Get Started Now" --bg-color "#FF6B00" --fg-color "#FFFFFF" python cta_optimizer.py --config cta.json --format json License: MIT """ from __future__ import annotations import argparse import json import logging import math import re import sys from dataclasses import dataclass, field from pathlib import Path from typing import Any # --------------------------------------------------------------------------- # Constants # --------------------------------------------------------------------------- LOG = logging.getLogger("cta-optimizer") # Words that create urgency and drive action — ranked by effectiveness # based on marketing research and conversion rate optimisation studies POWER_WORDS: dict[str, int] = { "free": 10, "now": 9, "instant": 9, "today": 8, "get": 8, "start": 8, "try": 8, "save": 7, "discover": 7, "unlock": 7, "claim": 7, "grab": 7, "join": 6, "learn": 6, "boost": 6, "launch": 6, "build": 6, "create": 6, "download": 5, "access": 5, "explore": 5, "upgrade": 5, "grow": 5, "new": 4, "easy": 4, "fast": 4, "quick": 4, "simple": 4, "exclusive": 4, "limited": 4, # ... 540 more lines ...
Buy Now — $19 Back to Products