iserter/easy-lead-capture 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

iserter/easy-lead-capture

Composer 安装命令:

composer require iserter/easy-lead-capture

包简介

Lightweight, embeddable lead capture system with SQLite storage, email notifications, and optional reCAPTCHA v3 protection.

README 文档

README

A lightweight, embeddable lead capture system for PHP. Beautiful forms, SQLite storage, email notifications, optional reCAPTCHA v3 — all in a single Composer package with zero build steps for consumers.

Features

  • Embeddable lead forms — iframe or JS snippet, works on any website
  • Configurable fields — text, email, phone, URL, textarea, multi-select checkboxes
  • Pre-compiled Tailwind CSS — beautiful out of the box (~15KB), customizable colors
  • SQLite storage — zero database setup, WAL mode enabled
  • Email notifications — SMTP, Sendmail, or SES (sent after response for fast submissions)
  • API ping — POST lead data to your own API/webhook on each submission (deferred)
  • reCAPTCHA v3 — optional, configurable score threshold
  • Admin panel — view leads, filter by date, export CSV
  • Lightweight — <20KB iframe payload, no frontend framework

Screenshots

Lead Form

Example Basic Lead Form

Success Message

Success Message with Social CTAs

Admin Panel

Admin Panel

Quick Start

1. Install

composer require iserter/easy-lead-capture

2. Configure

Create public/lead-capture/index.php:

<?php
require __DIR__ . '/../../vendor/autoload.php';

$app = new Iserter\EasyLeadCapture\App([
    'base_path' => '/lead-capture',
    'admin' => [
        'password' => password_hash('your-password', PASSWORD_DEFAULT),
        'email' => 'you@example.com',
        'linkedin_url' => 'https://www.linkedin.com/in/yourprofile',
        'x_url' => 'https://x.com/yourhandle',
    ],
    'form' => [
        'headline' => 'Join the Waitlist',
        'intro_text' => 'Be the first to know when we launch.',
        'fields' => [
            'name'  => ['label' => 'Name', 'required' => true],
            'email' => ['label' => 'E-mail', 'required' => true],
            'phone' => ['label' => 'Phone', 'required' => false],
        ],
    ],
    'on_submit' => [
        'success_headline' => 'Thank you!',
        'success_message' => 'We will get back to you soon.',
        'social_links' => [
            'enabled' => true,
            'message' => 'Follow us for updates.',
        ],
        'ping_api' => [
            'enabled' => false,
            'api_endpoint' => 'https://example.com/api/leads',
            'api_key' => '',
        ],
    ],
    'mail' => [
        'from' => ['address' => 'hello@example.com', 'name' => 'My App'],
        'mailer' => 'smtp',
        'smtp' => [
            'host' => '127.0.0.1',
            'port' => 587,
            'username' => '',
            'password' => '',
        ],
    ],
]);

$app->run();

Add the provided .htaccess to the same directory for Apache, or configure nginx to route requests to index.php.

3. Embed

iframe (recommended):

<iframe src="https://yoursite.com/lead-capture/form"
        style="border:none; width:100%; height:500px;"
        loading="lazy">
</iframe>

JavaScript loader:

<script src="https://yoursite.com/lead-capture/embed.js"></script>
<div id="lead-form"></div>
<script>EasyLeadCapture.render('#lead-form');</script>

Source tracking

Allow capturing UTM parameters from the embed URL. These values appear in the admin panel, CSV export, email notifications, and API ping payload.

iframe:

<iframe src="https://yoursite.com/lead-capture/form?utm_source=google&utm_medium=cpc" ...></iframe>

JavaScript loader:

EasyLeadCapture.render('#lead-form', {
  params: {
    utm_source: 'google',
    utm_medium: 'cpc'
  }
});

4. Admin Panel

Visit /lead-capture/admin to view captured leads and export as CSV.

Requirements

  • PHP 8.1+
  • SQLite3 extension
  • Composer

Development & Releasing

This project uses Conventional Commits and Release Please to automate versioning and changelog generation.

Commit Message Format

Each commit message should follow this structure: <type>[optional scope]: <description>

Type Description SemVer Impact
fix A bug fix patch
feat A new feature minor
feat! / fix! Breaking change major
chore, docs, test Internal changes none

Example: feat: add recaptcha v3 support

Releasing

  1. Merge your changes to main using Conventional Commit messages.
  2. Release Please will automatically open or update a Release PR (e.g., chore(main): release 1.0.0).
  3. Merging the Release PR will:
    • Tag the release (e.g., v1.0.0)
    • Create a GitHub Release with the changelog
    • Update composer.json and CHANGELOG.md

License

MIT

iserter/easy-lead-capture 适用场景与选型建议

iserter/easy-lead-capture 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 iserter/easy-lead-capture 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 iserter/easy-lead-capture 我们能提供哪些服务?
定制开发 / 二次开发

基于 iserter/easy-lead-capture 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 36
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-22