bentonow/bento-statamic-sdk
Composer 安装命令:
composer require bentonow/bento-statamic-sdk
包简介
Bento addon for Statamic, enabling you to easily integrate Bento with your Statamic site
关键字:
README 文档
README
Tip
Need help? Join our Discord or email jesse@bentonow.com for personalized support.
The Bento Statamic Addon makes it quick and easy to send emails and track events in your Statamic applications. We provide powerful and customizable APIs that can be used out-of-the-box to manage subscribers, track events, and send transactional emails through your Statamic Control Panel.
Get started with our 📚 integration guides, or 📘 browse the SDK reference.
Features
- Statamic Control Panel Integration: Configure Bento directly from your Statamic CP
- Laravel Mail Integration: Seamlessly integrate with Laravel's mail system to send transactional emails via Bento
- Event Tracking: Create and manage custom events directly from the CP
- Form Integration: Associate Bento events with Statamic forms for automated tracking
- Subscriber Management: Import and manage subscribers directly from your Statamic site
- Author Management: Easily configure email senders through the CP interface
- Test Email Functionality: Send test emails to verify your configuration
- Frontend Tracking: Optional automatic injection of Bento's tracking script
- User Sync: Automatic subscriber creation when new users register
Requirements
- PHP 8.0+
- Statamic 5.0+
- Laravel 10.0+
- Bento API Keys
Installation
- Install the package via Composer:
composer require bentonow/bento-statamic-sdk
- Publish the configuration file and assets:
php artisan vendor:publish --tag=bento-config php artisan vendor:publish --tag=bento-statamic-assets # (optional) if you wish to use a list of prebuilt bento events php artisan vendor:publish --tag=bento-statamic-seeders php artisan db:seed --class="Database\\Seeders\\Bento\\BentoFormEventsSeeder"
Configuration
-
Access the Bento configuration page in your Statamic Control Panel under Tools > Bento
-
Enter your Bento credentials:
- Site UUID
- Publishable Key
- Secret Key
You can find these at app.bentonow.com/account/teams
-
Configure your email settings:
- Select an author from your Bento account
- Send a test email to verify your configuration
-
Alternatively, you can configure Bento through your
.envfile:
BENTO_ENABLED=true BENTO_SITE_UUID="bento-site-uuid" BENTO_PUBLISHABLE_KEY="bento-publishable-key" BENTO_SECRET_KEY="bento-secret-key" MAIL_MAILER="bento" MAIL_FROM_ADDRESS="your-author@email.com"
Advanced Features
User Registration Tracking
Control automatic user registration tracking in Bento:
- Enable/disable automatic subscriber creation when new users register
- Automatically splits full names into first and last names
- Syncs email and basic user information
- Configure through Advanced Settings in the CP
User Synchronization Tags
When automatic user synchronization is enabled, you can configure default tags that will be automatically applied to new users when they are synchronized with Bento:
- Choose from your existing Bento tags in the Advanced Settings
- Add multiple tags that will be applied to all new users
- Tags are stored consistently whether using database or file-based storage
- Easily manage tags through the Control Panel interface
- Remove tags with a single click
- Changes take effect immediately for new user registrations
Configuration Steps:
- Navigate to Tools > Bento > Advanced Settings
- Enable "Automatic User Sync"
- Under the sync settings, use the tag selector to add default tags
- Selected tags will automatically be applied to all new user registrations
Example Usage:
If you've selected tags like "new-user" and "needs-onboarding", when a new user registers:
- A subscriber is created in Bento
- The user's name is split into first and last name
- Email and basic user information is synced
- Both "new-user" and "needs-onboarding" tags are automatically applied
This feature allows you to automatically segment new users without any additional configuration.
Frontend Tracking Script
Manage Bento's JavaScript tracking integration:
- Toggle automatic injection of Bento's tracking script
- Tracks visitor behavior and custom events
- Automatically adds tracking code to all frontend pages
- No manual code insertion required
Custom Events Management
Create and manage custom events for Bento automation:
- Define custom event names through the CP interface
- Use events in Bento's advanced flows and email automations
- Track events across your Statamic site
- Manage events with an intuitive UI
Form Event Integration
Connect Statamic forms with Bento events:
- Associate any Statamic form with a Bento event
- Automatically triggers Bento events on form submission
- Sends form data as event properties
- Perfect for triggering automated workflows
- Configure through the Form Events Manager in Advanced Settings
Example form event workflow:
- Create a custom event in the CP (e.g., "Newsletter Signup")
- Associate the event with a Statamic form
- When the form is submitted:
- Event is automatically triggered in Bento
- Form data is sent as event properties
- Triggers any associated Bento automations
Automatic Features
User Registration Tracking
The addon automatically tracks new user registrations in Bento:
- Creates a subscriber when a new user registers
- Splits full names into first and last names
- Syncs email and basic user information
Email Integration
Once configured, the addon:
- Handles transactional emails through Bento
- Uses your configured Bento authors as email senders
Things to Know
-
Email Limitations:
- Bento does not support email attachments
- No-reply sender addresses are not supported
-
Rate Limits:
- The Bento Transactional Email API is designed for low-volume emails
- Use for password resets, form notifications, etc.
- Not suitable for newsletter or bulk email sending
-
Author Configuration:
- You must use an authorized Bento author as your sender address
- Authors can be configured through the CP interface
-
Environment Handling:
- Configuration changes update your
.envfile - Cache is automatically cleared after configuration updates
- Runtime configuration is updated immediately
- Configuration changes update your
Contributing
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
- Make your changes
- Run the tests
- Submit a pull request
For major changes, please open an issue first to discuss what you would like to change.
License
The Bento Statamic Addon is open-sourced software licensed under the MIT license.
bentonow/bento-statamic-sdk 适用场景与选型建议
bentonow/bento-statamic-sdk 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 12 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「newsletter」 「email」 「transactional」 「email-marketing」 「statamic」 「statamic-plugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bentonow/bento-statamic-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bentonow/bento-statamic-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bentonow/bento-statamic-sdk 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
An updated fork (psr-0 to psr-4) from the original library "Mandrill/Mandrill" (https://bitbucket.org/mailchimp/mandrill-api-php)
Manage newsletters in Laravel
Sendernet transactional email php API client
Extensible library for building notifications and sending them via different delivery channels.
Email+ extends Kirby's email capabilities by adding support for multiple email services using the same Kirby email API.
Sendrill DB
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-12-13