-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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-1866] Map with e-mail statistics #12570
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 5.x #12570 +/- ##
============================================
+ Coverage 61.62% 61.88% +0.25%
- Complexity 34145 34193 +48
============================================
Files 2245 2248 +3
Lines 102077 102258 +181
============================================
+ Hits 62909 63286 +377
+ Misses 39168 38972 -196
|
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.
I have added a few comments to the code which are worth taking into account.
A few general comments and thoughts:
- In the email view, the map works well.
- In Campaign I was expecting a map with contacts that started the campaign, but there is a map with email interactions, should it be this way?
- Maybe a UI/UX person should look at these changes if there is something to improve?
- When I added a map widget to the dashboard, the lead number tooltips stopped working.
- The lead number tooltips aren't displayed in the dashboard map widget.
app/bundles/CoreBundle/Controller/AbstractCountryMapController.php
Outdated
Show resolved
Hide resolved
app/bundles/CoreBundle/Controller/AbstractCountryMapController.php
Outdated
Show resolved
Hide resolved
app/bundles/CoreBundle/Controller/AbstractCountryMapController.php
Outdated
Show resolved
Hide resolved
…unk/mautic into DPMMA-1866_email_stat_maps
Co-authored-by: John Linhart <jan@linhart.email>
Co-authored-by: John Linhart <jan@linhart.email>
Co-authored-by: John Linhart <jan@linhart.email>
@escopecz thank you for your review. I fixed the errors, removed the abstract controller and the model interface. I moved the methods to controllers. I think it's a good idea to refactor it as a service in the future if the functionality is developed further. Please check if these changes are ok. |
app/bundles/CampaignBundle/Controller/CampaignMapStatsController.php
Outdated
Show resolved
Hide resolved
app/bundles/CampaignBundle/Controller/CampaignMapStatsController.php
Outdated
Show resolved
Hide resolved
app/bundles/EmailBundle/Resources/views/Email/details.html.twig
Outdated
Show resolved
Hide resolved
app/bundles/EmailBundle/Tests/Controller/EmailMapStatsControllerTest.php
Outdated
Show resolved
Hide resolved
app/bundles/EmailBundle/Tests/Controller/EmailMapStatsControllerTest.php
Outdated
Show resolved
Hide resolved
app/bundles/EmailBundle/Tests/Controller/EmailMapStatsControllerTest.php
Outdated
Show resolved
Hide resolved
Co-authored-by: John Linhart <jan@linhart.email>
Co-authored-by: John Linhart <jan@linhart.email>
Co-authored-by: John Linhart <jan@linhart.email>
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.
I went through the code again and found one last small tiny thing I'd improve.
Co-authored-by: John Linhart <jan@linhart.email>
@escopecz thank you! I commited the suggested change and slightly improved the database query. |
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.
Description:
This PR introduces a map preview with email read and click statistics. Statistics are consistent with existing charts - a read or click on an e-mail is counted as 1, regardless of the number of reopenings or the number of clicked links. The map legend shows the total number of reads/clicks and how many of them were made by contacts with a non-empty country, because the statistics for leads without a location cannot be marked on the map.
Email preview (s/emails/view/{email_id})
Campaign preview (/s/campaigns/view/{campaign_id})
Email campaign
As part of this PR, zoom controls and map tooltip have been enlarged, so the Map widget on the dashboard and the map in the contact view (Places tab) will also change slightly in appearance, but their functionality should remain the same:
Steps to test this PR: