PHPackages                             isapp/statamic-lead-insights - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. isapp/statamic-lead-insights

ActiveStatamic-addon[Utility &amp; Helpers](/categories/utility)

isapp/statamic-lead-insights
============================

Know where your leads come from. Captures UTM parameters, referrers, and landing pages — attaches them to Statamic form submissions.

1.0.0(4mo ago)124proprietaryPHPPHP ^8.2CI passing

Since Feb 16Pushed 4mo agoCompare

[ Source](https://github.com/isap-ou/statamic-lead-insights)[ Packagist](https://packagist.org/packages/isapp/statamic-lead-insights)[ Docs](https://github.com/isap-ou/statamic-lead-insights)[ RSS](/packages/isapp-statamic-lead-insights/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (3)Versions (8)Used By (0)

Lead Insights for Statamic
==========================

[](#lead-insights-for-statamic)

**Know where your leads come from — without sacrificing their privacy.**

Lead Insights automatically captures UTM parameters, referrers, and landing pages from your visitors and attaches them to Statamic form submissions. See which campaigns, sources, and pages drive real conversions — right from your Control Panel dashboard.

No database required. No third-party scripts. No cookies without consent.

---

Features
--------

[](#features)

- Automatic UTM capture (source, medium, campaign, term, content)
- Referrer and landing page tracking
- Attribution data attached to every form submission
- Dashboard widgets with lead counts and share percentages
- First-party cookie with configurable TTL
- Consent-gated by default (EU-first)
- Works with any cookie-based consent management platform
- Flat-file storage — no database migrations, no external services
- Available in English, German, and Dutch

Free vs Pro
-----------

[](#free-vs-pro)

FeatureFreeProUTM capture &amp; form enrichment✓✓Consent gating (EU-first)✓✓Configurable cookie &amp; attribution key✓✓Leads by Source widget✓✓Leads by Campaign widget✓Leads by Form widget✓Form → Source Breakdown widget✓CSV export✓Data retention &amp; prune command✓First-touch + last-touch attribution✓Installation
------------

[](#installation)

```
composer require isapp/statamic-lead-insights
```

The addon registers automatically via Statamic's addon discovery.

How It Works
------------

[](#how-it-works)

**1. Capture** — A lightweight middleware reads UTM parameters, the referrer, and the landing URL on every page visit. If consent is given, it stores the data in a first-party cookie.

**2. Enrich** — When a visitor submits a Statamic form, the attribution payload is automatically attached to the submission. No form changes needed.

**3. Visualize** — Dashboard widgets show which sources, campaigns, and forms drive the most leads. Export the data as CSV for deeper analysis.

Configuration
-------------

[](#configuration)

All settings are managed in the Control Panel under **Addons → Lead Insights**.

### General

[](#general)

SettingDefaultDescription`enabled``true`Enable or disable the addon globally`attribution_key``__attribution`Key used to store attribution data on submissions`cookie_name``lead_insights_attribution`Name of the first-party cookie`cookie_ttl_days``30`Days the attribution cookie persists### Consent / GDPR

[](#consent--gdpr)

SettingDefaultDescription`consent_required``true`Require consent before storing cookies`consent_cookie_name`—Cookie name to check for marketing consent`consent_cookie_value`—Expected value (empty = presence check only)`store_landing_without_consent``true`Store landing URL even without consent`store_referrer_without_consent``false`Store referrer without consent### Reporting

[](#reporting)

SettingDefaultDescription`top_n``10`Maximum rows shown in dashboard widgets`default_date_range_days``30`Default date range for widgets### Retention (Pro)

[](#retention-pro)

SettingDefaultDescription`retention_days``365`Days to keep attribution data before pruning`prune_schedule_enabled``false`Enable automatic scheduled pruning`prune_schedule_frequency``daily`How often to prune: daily, weekly, or monthly`prune_schedule_time``02:00`Time of day to run (HH:MM, 24-hour format)Widgets
-------

[](#widgets)

Widgets are registered automatically but need to be added to your dashboard. Add them in `config/statamic/cp.php`:

```
'widgets' => [
    ['type' => 'leads_by_source', 'width' => 50],
    ['type' => 'leads_by_campaign', 'width' => 50],
    ['type' => 'leads_by_form', 'width' => 50],
    ['type' => 'form_source_breakdown', 'width' => 50, 'form' => 'contact'],
],
```

### Leads by Source (Free)

[](#leads-by-source-free)

Groups form submissions by `utm_source` — see which traffic sources generate the most leads.

### Leads by Campaign (Pro)

[](#leads-by-campaign-pro)

Groups submissions by `utm_campaign` — measure which campaigns convert.

### Leads by Form (Pro)

[](#leads-by-form-pro)

Groups submissions by form handle — find out which forms get the most attributed leads.

### Form → Source Breakdown (Pro)

[](#form--source-breakdown-pro)

Select a specific form and see a per-source breakdown. Configure the `form` handle in widget settings.

All widgets display a table with **Label**, **Leads**, and **Share %** columns, filtered by the configured date range.

CSV Export (Pro)
----------------

[](#csv-export-pro)

Export any widget's data as a CSV file. Available export types:

- `source` — Leads by source
- `campaign` — Leads by campaign
- `form` — Leads by form
- `form_source` — Source breakdown for a specific form

Access exports from the Control Panel or via:

```
GET /cp/lead-insights/export?type=source&days=30

```

Requires the **Export Lead Insights** permission.

Data Retention (Pro)
--------------------

[](#data-retention-pro)

Remove old attribution data while keeping form submissions intact:

```
php artisan lead-insights:prune
```

This strips the `__attribution` key from submissions older than the configured `retention_days` (default: 365). The submissions themselves are preserved.

Override the retention period per run:

```
php artisan lead-insights:prune --days=90
```

### Automatic scheduling

[](#automatic-scheduling)

Enable automatic pruning in **Addons → Lead Insights → Retention**. Choose a frequency (daily, weekly, or monthly) and a time of day. The addon registers the schedule automatically — no changes to `routes/console.php` needed.

Make sure `php artisan schedule:run` is set up in your server's crontab.

Privacy &amp; GDPR
------------------

[](#privacy--gdpr)

Lead Insights is designed EU-first. Consent is required by default — no cookie is set and no UTM data is stored until consent is detected.

### What is NOT collected

[](#what-is-not-collected)

- IP addresses
- User-agent strings
- Browser fingerprints
- Click IDs (gclid, fbclid, etc.)
- Cross-site or third-party tracking data

### Cookie properties

[](#cookie-properties)

- First-party only
- `SameSite=Lax`
- `Secure` on HTTPS
- `HttpOnly`
- Configurable name and TTL

### Consent integration

[](#consent-integration)

Lead Insights works with any cookie-based consent management platform (Cookiebot, CookieYes, Complianz, etc.). Configure the consent cookie name and expected value in settings. No built-in consent banner — it respects your existing setup.

### Without consent

[](#without-consent)

When `consent_required` is `true` (default) and no consent is detected:

- No cookie is set
- No UTM parameters are stored
- Only the landing URL and timestamp are attached at form submission time (configurable)

Permissions
-----------

[](#permissions)

PermissionEditionDescriptionView Lead InsightsFree + ProAccess dashboard widgetsExport Lead InsightsProDownload CSV exportsAssign permissions to roles in **CP → Users → Roles**.

Requirements
------------

[](#requirements)

- Statamic 6
- PHP 8.2+

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance75

Regular maintenance activity

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

137d ago

Major Versions

1.0.0 → 6.x-dev2026-02-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/9bfb1eae1e3e43813da6740e5eaa39307a95db7561c2d27e7e8aa24233cdcbeb?d=identicon)[andrii-trush](/maintainers/andrii-trush)

---

Top Contributors

[![andrii-trush](https://avatars.githubusercontent.com/u/14265776?v=4)](https://github.com/andrii-trush "andrii-trush (25 commits)")

---

Tags

attributionformsleadsstatamicstatamic-addonstatamic-v6utmmarketinganalyticsFormsleadstatamicUTMattribution

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/isapp-statamic-lead-insights/health.svg)

```
[![Health](https://phpackages.com/badges/isapp-statamic-lead-insights/health.svg)](https://phpackages.com/packages/isapp-statamic-lead-insights)
```

###  Alternatives

[statamic/seo-pro

68516.6k](/packages/statamic-seo-pro)[aerni/livewire-forms

A Statamic forms framework powered by Laravel Livewire

2915.1k](/packages/aerni-livewire-forms)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

23111.5k14](/packages/marcorieser-statamic-livewire)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

15133.0k](/packages/withcandour-aardvark-seo)[mitydigital/feedamic

A fully-featured RSS and Atom feed generator for Statamic.

1075.6k](/packages/mitydigital-feedamic)[aerni/advanced-seo

Comprehensive SEO addon for Statamic with flexibility in mind

1818.2k](/packages/aerni-advanced-seo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
