bbloomberg / mautic-zipline-bundle
Zipline URL shortener for Mautic
Package info
github.com/bbloomberg/mautic-zipline-bundle
Type:mautic-plugin
pkg:composer/bbloomberg/mautic-zipline-bundle
Requires
- php: >=8.0
- mautic/core-lib: ^5.0
Requires (Dev)
- phpunit/phpunit: ^10.5
README
Registers a self-hosted Zipline instance as a URL shortener in Mautic. Once configured and published, Mautic rewrites tracked links (emails, SMS, page redirects) into short links created through your Zipline instance.
Built to the same conventions as the Mautic Bitly bundle — it plugs into Mautic core's shortener
extension point (mautic.shortener.service).
Requirements
- Mautic 5 (
mautic/core-lib ^5.0) - PHP 8.0+
- A reachable Zipline instance and an API token
Installation
Install into your Mautic project with Composer:
composer require bbloomberg/mautic-zipline-bundle
The plugin installs to plugins/MauticZiplineBundle. Then clear the cache and reload plugins:
php bin/console cache:clear php bin/console mautic:plugins:reload
Configuration
- In Mautic, go to Settings → Plugins → Zipline.
- Enter:
- Zipline instance URL — e.g.
https://zip.example.com - API token — from your Zipline dashboard (avatar → Copy token, or Settings → User).
- Zipline instance URL — e.g.
- Publish the integration and save. The token/URL are validated against your instance on save.
With the integration published, Mautic automatically shortens links through Zipline. If Zipline is unreachable or the integration is unpublished, Mautic falls back to the original (unshortened) URL and logs the error — sends are never blocked.
How it works
Client\ConnectioncallsPOST {instanceUrl}/api/user/urlswith{"destination": "<url>"}and theAuthorization: <token>header (Zipline uses the raw token, noBearerprefix).Shortener\ZiplineServicereads the short link from theurlfield of the JSON response.- Validation checks the credentials with
GET {instanceUrl}/api/user.
Deployment
For full deploy, upgrade, rollback, and troubleshooting instructions, see DEPLOYMENT.md.
License
MIT — see LICENSE.