New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DPMMA-2506 Smart Campaign Event Scheduling Based on Contact Behavior #13569
base: 5.x
Are you sure you want to change the base?
DPMMA-2506 Smart Campaign Event Scheduling Based on Contact Behavior #13569
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 5.x #13569 +/- ##
============================================
+ Coverage 61.50% 61.54% +0.03%
- Complexity 34067 34112 +45
============================================
Files 2241 2243 +2
Lines 101850 102009 +159
============================================
+ Hits 62647 62782 +135
- Misses 39203 39227 +24
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrykgruszka very good job, extensive tests make analysis easier. Topics that can be addressed
- Do we include e-mail opens and website visits, or do we also include form results? I think this is also an important interaction in the system.
- Can you add a material based on which the default email sending time values are set?
- We could in the future move variables from
app/bundles/LeadBundle/Config/config.php
to the dashboard configuration - A nice functionality would be to add information about the optimal interaction time of a given user on the contact card. I would see this as a CRON job. We could show data from the cache and write the date of last modification next to it.
We also have a feature like that for segmenting emails. |
@patrykgruszka do you use it already in production? |
@tomekkowalczyk good idea, I've added the form submissions to the analysed interactions. @kuzmany I've tested the queries on a large database and it looks good:
In summary, it's less than 0.1 sec for a single contact to get the data from the DB. Processing the interactions with PHP will not be time consuming, so we can omit that. Additionally, a cache is applied so that the database data is not loaded every time. |
@patrykgruszka We've already done it for segment emails. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look ok to me, good job. I tested several scenarios and it seems to work according to the task description.
@patrykgruszka could you take a look at the conflicts on this PR? We will also need some documentation to both add the info about the feature in the email sending section, and the configuration settings for the config page. Looks like an awesome feature and would love to see it in Mautic! |
Description:
This pull request enhances campaign system by dynamically optimizing the timing of event execution based on
individual contact behaviors. By analyzing interaction patterns, such as email opens, website visits and form submissions, the system determines the most effective moment to send out marketing communications, thereby increasing the likelihood of
engagement.
This event schedule option is available for Send Email, Marketing Message, Push Contact to Integration and Send a
Webhook
How It Works
hits and form submissions, to analyze the contact's engagement patterns.
calculate optimal timing. Each interaction type (e.g., email open, website visit) is only counted once per hour. A
minimum of 5 interactions is required, otherwise the default ranges are used.
calculates the optimal time for executing a campaign event, considering the contact's historical engagement patterns.
optimal window.
option and additionally determines the best day of the week. By default, a contact can have from 1 to 3 optimal days.
optimal day.
Default Settings for Optimal Timing
When a contact does not have enough interaction data, default settings are used. These can be configured by an
administrator in the Mautic configuration file and are adjusted according to the contact's preferred timezone.
Based on https://blog.hubspot.com/marketing/best-time-to-send-email
Cache and Limits on Interaction Data Retrieval
To optimize performance for large databases, caching is used to store interaction data, reducing the need for frequent
retrieval. The default settings are:
Steps to test this PR:
event within 24h and a 7d period)
email read and page hit) is counted per hour. By default, 5 interactions are needed for the contact to change the
execution time.
activity time.