Sylius Mautic Plugin is a plugin for the Sylius e-commerce platform that integrates your website with the marketing automation tool Mautic. With this integration, you can track user actions on your site in order to run effective marketing campaigns.
-
Install the plugin using Composer:
composer require iam-sayco/sylius-mautic-plugin
-
Add the plugin to your
config/bundles.php
:// config/bundles.php return [ // ... Sayco\SyliusMauticPlugin\SaycoSyliusMauticPlugin::class => ['all' => true], ];
-
Register the plugin configs in the imports section of your
config/packages/_sylius.yaml
:# config/packages/_sylius.yaml imports: ... - { resource: "@SaycoSyliusMauticPlugin/Resources/config/config.yml" }
-
Configure the plugin by creating
config/packages/sayco_sylius_mautic.yaml
:Nest under the
parameters
key the following configuration:sayco_sylius_mautic.tracking_config: track_outbound: 'true' track_mailto: 'true' track_tel: 'true' track_download: 'true' track_download_extensions: [ ".pdf", ".zip", ".doc" ]
The
tracking_host
parameter should be set to the URL of your Mautic instance. It is used in the tracking script embedded in your website to send user actions to Mautic. The other configuration parameters are used to enable or disable tracking of specific user actions.# config/packages/sayco_sylius_mautic_plugin.yaml sayco_sylius_mautic.api.auth: baseUrl: 'https://your-mautic-instance.com' version: 'BasicAuth' userName: 'your-api-mautic-username' password: 'your-api-mautic-password'
The
api.auth
parameter should be set to the authentication details of your Mautic API. Currently, only BasicAuth is supported. Create a new user in Mautic and setup the role and permissions for the user. The best would be to limited to the API operations only. -
Install assets:
This plugin uses the assets required for tracking user actions. To install them, run the following command:
bin/console assets:install
Just go to your Mautic and view the tracking data you have collected from your Sylius website.
There are several features that are planned for this plugin, but have not yet been implemented (out of scope for MVP). If you would like to contribute to this plugin, please consider working on one of these features:
- Improve documentation.
- Add tests coverage.
- Add utility twig functions to easily embed content from Mautic such as forms and dynamic content.
- Add ability to use Mautic e-mails for Sylius mail notifications.
- Add ability to authenticate users in Sylius using Mautic OAuth.
- Improve crosselling/associated products by using Mautic segments.
- Add promotions conditions/rules based on Mautic segments.
If you have any other ideas for features, please open an issue to discuss them or propose a pull request.
Feel free to contribute to this plugin by opening issues or submitting pull requests. All help is appreciated, especially with documentation and testing.
This plugin is released under the MIT License. See the LICENSE file for details.
Made with ❤️ to Open Source by Mariusz Andrzejewski - Sayco.