dadolun95/magento2-brevo-sendinblue-light

Magento2 Brevo (Sendinblue previously) Contact Sync Integration Module

1.0.14 2023-09-02 09:40 UTC

This package is auto-updated.

Last update: 2024-05-01 00:06:13 UTC


README

Latest Stable Version

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.

Features

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

Compatibility

Fully tested and working on Magento CE(EE) 2.4.4, 2.4.5, 2.4.6

Installation

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
CONFIGURATION

You must enable the module from "Stores > Configurations > Dadolun > Brevo > General" section adding you Brevo API key: image image 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): image image Remember to enable tracking on Brevo, then copy you client key from the js snippet on Magento configurations: image image

You must enable contact sync after the initial setup for newsletter subsription synchronization on Brevo: image 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). image
SMTP CONFIGURATION

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: image image

Contributing

Contributions are very welcome. In order to contribute, please fork this repository and submit a pull request.