0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00
ghost/core/server
Kevin Ansfield 717543835c
Added email analytics service (#12393)
no issue

- added `EmailAnalyticsService`
  - `.fetchAll()` grabs and processes all available events
  - `.fetchLatest()` grabs and processes all events since the last seen event timestamp
  - `EventProcessor` passed event objects and updates `email_recipients` or `members` records depending on the event being analytics or list hygiene
    - always returns a `EventProcessingResult` instance so that progress can be tracked and merged across individual events, batches (pages of events), and total runs
    - adds email_id and member_id to the returned result where appropriate so that the stats aggregator can limit processing to data that has changed
    - sets `email_recipients.{delivered_at, opened_at, failed_at}` for analytics events
    - sets `members.subscribed = false` for permanent failure/unsubscribed/complained list hygiene events
  - `StatsAggregator` takes an `EventProcessingResult`-like object containing arrays of email ids and member ids on which to aggregate statistics.
  - jobs for `fetch-latest` and `fetch-all` ready for use with the JobsService
- added `initialiseRecurringJobs()` function to Ghost bootup procedure that schedules the email analytics "fetch latest" job to run every minute
2020-11-26 13:09:38 +00:00
..
adapters
api 🐛 Fixed backwards compatibility for newsletters (#12422) 2020-11-25 13:58:21 +00:00
data Added migrations for email analytics (#12387) 2020-11-25 17:48:24 +00:00
lib Added JSDoc comments into package-json lib 2020-11-25 11:29:04 +00:00
models Added migrations for email analytics (#12387) 2020-11-25 17:48:24 +00:00
public
services Added email analytics service (#12393) 2020-11-26 13:09:38 +00:00
translations
views
web Added support for graceful job shutdown and worker threads 2020-11-23 17:17:49 +13:00
analytics-events.js
ghost-server.js Improved job queue logging 2020-11-25 13:28:13 +13:00
index.js Added email analytics service (#12393) 2020-11-26 13:09:38 +00:00
overrides.js Removed global.Promise override (#12182) 2020-11-04 10:55:47 +00:00
update-check.js