This module is direct dependency of a more specific, extended integration module (always open source).
Install this extension only if you need to synchronize subscribers to Brevo and don't need order synchronization and cart events tracking.
Syncronization functionality for Brevo (formerly Sendinblue) - Magento2 integration. This module integrates your Magento2 site with Brevo allowing you to refine your marketing strategy, create automations on many scenarios and create campaigns based on your Magento e-commerce site data.
- Simplified module configuration
- Sendinblue PHP SDK usage
- Debug log feature
- Autonomous synchronization of subscribers data on Brevo
- Implementation of synchronous vs asynchronous data synchronization on Brevo avoiding bottlenecks
- Pageview tracking and user navigation tracking on Brevo
Fully tested and working on Magento CE(EE) 2.4.4, 2.4.5, 2.4.6
You can install this module adding it on app/code folder or with composer.
composer require dadolun95/magento2-brevo-sendinblue-light
Then you'll need to enable the module and update your database and files:
php bin/magento module:enable Dadolun_SibCore Dadolun_SibContactSync
php bin/magento setup:upgrade
php bin/magento setup:di:compile
You must enable the module from "Stores > Configurations > Dadolun > Brevo > General" section adding you Brevo API key: With the debugger option enabled the module will log each API v3 call result and response code and also observer calls on a dedicated file localed on /var/log/sendinblue-integration.log file. Remember that letting the debugger enabled on production enviroment can slow down the website.
Enable Brevo visitor tracking in order to register each customer pageview on Brevo via API (always synchronous and client-side): Remember to enable tracking on Brevo, then copy you client key from the js snippet on Magento configurations:
You must enable contact sync after the initial setup for newsletter subsription synchronization on Brevo: Choose between "Sync" and "Async" Synchronization type.
- "Sync" mode (not recommended) will create or update subscriber data on Brevo synchronously at each magento2 event (subscription update / order update) making an API call to Brevo
- "Async" mode (recommended) use Magento2 message queue system with a dedicated MySQL-operated queue (See here message queue configuration guide) so you need to configure also magento to use consumer properly updating your app/etc/env.php file (something like that):
...
'cron_consumers_runner' => [
'cron_run' => true,
'max_messages' => 1000,
'consumers' => [
'sibContactProcessor'
]
],
...
The module provides a "Sync contact" CTA on adminhtml that move all existing contacts to Brevo (only new subscribers are synced on runtime). The "Sync contact" CTA use Magento2 message queue system. So, clicking "Sync Order" you'll only add a complete order synchronization request on queue. If you had choose the Synchronous mode and you've not configured message queue system on your Magento installation, you will need to run this command from your cli each time you want to perform a complete "Contact Sync" request from adminhtml:
php bin/magento queue:consumers:start sibContactProcessor
Since Contact synchronization functionality is enabled two Brevo lists are created:
- [Magento Optin Form] > Temp - DOUBLE OPTIN (contacts that need confirmation are moved here temporarely)
- [magento] > subscriptions Complete the contact sync configuration choosing the Brevo list where you want to synchronize your contacts (subscriptions created list is recommended). You can also create new lists and folders on Brevo and select it differently for each Magento store configured (Ex: subscriptions_USA for a website working in United States, and subscriptions_EU for a website working in Europe).
For Magento 2.4.4 and Magento 2.4.5 you can install Mageplaza or Magepal SMTP modules. Use Magento core SMTP configuration feature for 2.4.6 and newer versions instead. Brevo SMTP settings are located on "Transactional > Settings" section:
Contributions are very welcome. In order to contribute, please fork this repository and submit a pull request.