Mibew Messenger Community

General => Support => Topic started by: emsjessec on September 16, 2019, 01:39:41 PM

Title: ActiveCampaign tagging
Post by: emsjessec on September 16, 2019, 01:39:41 PM
I would like to tag users in ActiveCampaign for marketing / follow-up purposes.

Active Campaign involves making a request using cURL.  The request contains the email address, first/last name, and the tag (such as "Used mibew chat").

Are there any recommendations on how to do it?  Should I edit the compiled code, edit source and rebuild, or put the functionality into a plugin?
Title: Re: ActiveCampaign tagging
Post by: faf on September 16, 2019, 11:38:53 PM
It's always a bad idea to try to change the code without intention to contribute it to upstream. And your code is way too specific to be included in the code base of Mibew Messenger. Obviously it's better to create a special plugin. Maybe one could utilize \Mibew\EventDispatcher\Events::USERS_UPDATE_VISITORS_LOAD event.

Moreover, one is unable to control the remote service and its response times. So I'd recommend to make requests to that service asynchronous.