Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Statamic Lead Magnets

Statamic Lead Magnets Laravel Package

goldnead/statamic-lead-magnets

A Statamic addon for creating lead magnets—gated downloads, checklists, and resources that collect visitor details before delivery. Define magnets in the control panel, embed capture forms in your templates, and manage leads without leaving Statamic.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Statamic Lead Magnets
How do I install goldnead/statamic-lead-magnets in a Laravel Statamic project?
Install it with Composer using composer require goldnead/statamic-lead-magnets, then run php artisan migrate. Because it is a Statamic addon, it registers itself and exposes lead magnet management in the Control Panel without extra service provider wiring. Publish the optional config only if you want webhook notifications or to adjust entitlements settings.
Does Statamic Lead Magnets integrate with Statamic forms for email capture?
Yes. Magnets connect to Statamic forms, so the standard form submission flow captures the visitor's email before the resource is delivered. You embed the capture form in your templates and the addon handles gating and delivery. Collected leads remain normal Statamic form submissions you can manage inside the Control Panel.
How do I gate a download behind email capture in Statamic?
Create a lead magnet in the Control Panel, attach it to an entry, and connect it to a Statamic form. The form submission acts as the gate: once the email is captured, the signed download or access delivery is released. Existing resources keep working unchanged, so you can add gating incrementally across a site.
Which Laravel and Statamic versions does this lead magnet addon support?
The package targets Laravel applications running Statamic and follows standard framework conventions: Eloquent, Blade, service container bindings, events, and config. Check the composer.json constraints before upgrading to confirm compatibility with your Statamic major version. Full feature leverage also depends on whether your project already uses the automations and entitlements addons.
How do I upgrade to v3.12.0 of statamic-lead-magnets?
Run composer update to pull v3.12.0, then run php artisan migrate. The migration only adds three nullable columns to lead_magnet_resources (access_product, access_path, and delivery_series), so existing resources are unaffected. You can optionally add the notifications and entitlements.access_source config keys if you want the new features.
How do I implement the AccessSubjectResolver contract for Access delivery?
Bind your own implementation of Contracts\AccessSubjectResolver in the service container so the addon can resolve or create the account that receives access. The package deliberately keeps user and account creation outside its scope, so your resolver must handle account lookup, idempotency, and race conditions safely. Without a binding, the Access delivery method cannot be used at all.
How does the Mail series feature work with the automations addon?
The Mail series bridge reads the automations addon's repository and run history to enroll the reader in a configured automation series. If the addon is absent, disabled, or the reader is already enrolled, it gracefully falls back to the standard delivery mail. Version drift between the two packages is the main risk, so pin compatible versions in composer.json.
Can I add custom placeholders to delivery emails with DeliveryVariables?
Yes. The DeliveryVariables event lets you register listeners that add your own placeholders without subclassing delivery classes. It is opt-in, so you only wire listeners where extra variables are needed. The event passes context such as the reader, resource, and delivery method so listeners can build placeholders safely.
What data does the webhook notification send and can I filter it?
Webhook notifications post request data to a Discord-compatible endpoint on every request, and the feature is opt-in via config. Because payloads may contain sensitive information, review which fields you expose, enforce TLS, and secure the endpoint. Also confirm whether dispatch is synchronous or queued and define retry and backoff behavior for your environment.
Is goldnead/statamic-lead-magnets safe to use in production?
Overall technical risk is low to moderate: the migration only adds nullable columns and the new features are opt-in. The main risks are a misimplemented AccessSubjectResolver granting access to the wrong account, version drift in the automations bridge, and privacy concerns around webhook payloads. Code review, version pinning, and a configuration review keep these manageable.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource