Commit Graph

53 Commits

Author SHA1 Message Date
Jan Jakes
ab16f5be10 Remove ignores of WordPressDotOrg sniffs
[MAILPOET-6150]
2024-08-29 17:23:34 +02:00
Rostislav Wolny
33f4b2d729 Replace usage of WP's current_time without gmt parameter in libs
This commit replaces usages by Carbon::now or in case we need a timestamp it
keeps current_time but adds the gtm parameter as true.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
Jan Jakes
c25d7d6b53 Use single quotes for strings in SQL queries
This is more standard SQL and required by WPDB.

[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
Jan Jakes
ff6a98fae1 Replace deprecated array types with Doctrine's ArrayParameterType
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
Jan Lysý
191843d2a8 Change status for all associated purchases with an order
[MAILPOET-5584]
2024-05-06 11:43:32 +02:00
David Remer
bb84e1fc03 Add GA params only when tracking is set
[MAILPOET-5939]
2024-03-15 13:18:01 +01:00
David Remer
7dc202561d Prevent false positives in parameter detection
[MAILPOET-5882]
2024-02-26 11:37:31 +01:00
David Remer
81582b80bc Add utm_source_platform parameter
[MAILPOET-5882]
2024-02-26 11:37:31 +01:00
David Remer
08ed35f3ea Do not overwrite existing parameters
[MAILPOET-5882]
2024-02-26 11:37:31 +01:00
David Remer
98a62e8bdc Filter the processed link
[MAILPOET-5882]
2024-02-26 11:37:31 +01:00
David Remer
6085ec954f Always add utm_source and utm_medium parameters to links
[MAILPOET-5882]
2024-02-26 11:37:31 +01:00
Rostislav Wolny
7b86de1346 Set sentAt date when saving newsletter stats
MySQL 8 can't handle null values for not null columns even when we set a default
See detailed explanation
https://kedar.nitty-witty.com/blog/mysql-8-timestamp-cannot-be-null-and-explicit_defaults_for_timestamp
[MAILPOET-5886]
2024-02-05 15:24:26 +01:00
Jan Jakes
2b5135474e Save deleted newsletter in woocommerce purchase stats as NULL
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
ddfde2059e Delete newsletter data from woocommerce purchase stats using a repository
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
1221a64d3d Delete statistics clicks using a repository
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
17168643c9 Delete statistics opens using a repository
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Jakes
c492ff4d8d Delete statistics newsletters using a repository
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Rodrigo Primo
33769e703c Replace StatisticsNewsletters model with Doctrine in SendingQueue
[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Jan Lysý
525c80bac4 Fix PHPStan warnings in lib
[MAILPOET-5751]
2023-12-13 11:48:14 +01:00
David Remer
df16cc717b Add action when subscriber follows link
[PREMIUM-243]
2023-11-08 13:42:36 +01:00
David Remer
c487576e18 Track refunds
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
ab694414e3 Extract tracking of existing statistic in own method
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
7ac2065b1a Track purchases regardless of status but return revenue status correctly
When we apply this commit every purchase will be tracked. When the shop manager updates an order
the status will be updated. For the statistics it will only return values for purchases with
the 'completed' status

[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
bba7786e7e Store current order status in revenue statistics
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
2e85a5b624 Extract receiving the click from date to private method
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
73f669a656 Listen to all status changes
This commit listens to all status changes but does not
alter the business logic as of yet.

[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
John Oleksowicz
06df45bb55 Refactor subscriber stats to accept startTime param
MAILPOET-5508
2023-08-31 13:17:34 +02:00
David Remer
0a4148d2a5 Update SQL query to track also deleted campaigns
[MAILPOET-5486]
2023-08-22 10:19:37 +02:00
John Oleksowicz
62ac4d5e27 Make stats consistent with engagement score
This makes SubscriberStatisticsRepository the source of truth for
engagement score data instead of having separate queries.

As part of this change, we will now only be displaying the last year's
worth of data when viewing a report for an individual subscriber.

It also updates engagement score calculation to only count human opens,
not machine opens.

MAILPOET-5410
2023-08-11 16:39:57 +02:00
John Oleksowicz
99630f85aa Reset engagement score for inactive subscribers
If someone hasn't received at least 3 emails in the last year, we can't
trust that their level of engagement would be the same now as it was
over a year ago.

MAILPOET-5410
2023-08-11 16:39:57 +02:00
John Oleksowicz
0e9b96d0b7 Track opens, clicks, purchases, and page views
MAILPOET-4998
2023-06-22 15:29:22 +02:00
Rostislav Wolny
b24beb1dae Track only revenue data in the current shop currency
This is a protection against an edge case when a shop changes
the currency. We want to make sure we don't mix currencies.
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
Rostislav Wolny
b52c53f7f5 Add comment about revenue being tracked once per purchase
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
Rostislav Wolny
f66be1b947 Improve typehints and doctypes for the woo revenue tracking
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
Rostislav Wolny
7ce1b6eb6c Cast numeric revenue tracking data
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
Rostislav Wolny
23e08ecb44 Add method for fetching revenue data for the WC Tracker
[MAILPOET-5014]
2023-01-30 09:21:39 +01:00
Jan Jakes
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
Jan Jakes
c67c58709b Unify spacing of declare statements
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
Rostislav Wolny
842f435976 Add default value for method to StatisticsUnsubscribeEntity
When entity is created the default value is not set and it may causes
failures when it is not set additionally.
This commit sets default value and also defines a constant for the default value.
[PREMIUM-211]
2022-11-28 18:21:52 +01:00
Sam Najian
96dde7107b Expose unsubscribe analytics properperties
[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
Sam Najian
735d33d05b Add method of tracking when tracking unsubscriptions
[MAILPOET-4733]
2022-11-25 14:51:57 +01:00
Rodrigo Primo
538647946e Refactor GATracking to use Doctrine instead of Paris
The test class was also refactored.

[MAILPOET-4592]
2022-09-14 10:38:01 +02:00
David Remer
53fc49d1eb Simplify phpcs:disable comments
Additionally this commit contains a conversion from %d to %s in a query

[MAILPOET-4219]
2022-04-04 17:12:33 +02:00
David Remer
a8d88beec9 Escape output according to WP sniffs
[MAILPOET-4129]
2022-04-04 17:12:33 +02:00
Brezo Cordero
3fca53f350 Also count machine opens and clicks as engagement
[MAILPOET-4081]
2022-03-14 12:07:59 +01:00
Rostislav Wolny
a644c71e64 Add subscriber detection from Woo Session to subscriber action tracker
[MAILPOET-4101]
2022-02-16 16:06:05 +01:00
Rostislav Wolny
4dce8c2ec5 Refactor SubscriberActivityTracker to get rid of entity caching
[MAILPOET-3897]
2022-02-07 09:38:25 +01:00
Rostislav Wolny
c953eb1b53 Add missing return type hints
[MAILPOET-3897]
2022-02-07 09:38:25 +01:00
Rostislav Wolny
c38d3aeac8 Disable subscriber activity tracking for admin interface
[MAILPOET-3897]
2022-02-07 09:38:25 +01:00
Rostislav Wolny
9c251f8560 Add support for callbacks to subscriber activity tracker
[MAILPOET-3897]
2022-02-07 09:38:25 +01:00