analytics/lib/plausible_web/templates/email
Adrian Gruntkowski f8b4d5066a
Add multiple imports per site (#3724)
* Clean up references to no longer active `google_analytics_imports` Oban queue

* Stub CSV importer

* Add SiteImport schema

* Rename `Plausible.Imported` module file to match module name

* Add `import_id` column to `Imported.*` CH schemas

* Implement Importer behavior and manage imports state using new entities

* Implement importer callbacks and maintain site.imported_data for UA

* Keep imports in sync when forgetting all imports

* Scope imported data queries to completed import IDs

* Mark newly imported data with respective import ID

* Clean up Importer implementation a bit

* Test querying legacy and new imported data

* Send Oban notifications on import worker failure too

* Fix checking for forgettable imports and remove redundant function

* Fix UA integration test

* Change site import source to atom enum and add source label

* Add typespecs and reduce repetition in `Plausible.Imported`

* Improve documentation and typespecs

* Add test for purging particular import

* Switch email notification templates depending on import source

* Document running import synchronously

* Fix UA importer args parsing and ensure it's covered by tests

* Clear `site.stats_start_date` on complete import to force recalculation

* Test Oban notifications (h/t @ruslandoga)

* Purge stats on import failure right away to reduce a chance of leaving debris behind

* Fix typos

Co-authored-by: hq1 <hq@mtod.org>

* Fix another typo

* Refactor fetching earliest import and earliest stats start date

* Use `Date.after?` instead of `Timex.after?`

* Cache import data in site virtual fields and limit queried imports to 5

* Ensure always current `stats_start_date` is used

* Work around broken typespec in Timex

* Make `SiteController.forget_imported` action idempotent

* Discard irrecoverably failed import tasks

* Use macros for site import statuses

There's also a fix ensuring only complete imports are considered
where relevant - couldn't isolate it as it was in a common hunk

* Use `import_id` as worker job uniqueness criterion

* Do not load imported stats data in plugins API context

---------

Co-authored-by: hq1 <hq@mtod.org>
2024-02-14 09:32:36 +01:00
..
activation_email.html.eex remove user salutations by @user as done by the layout 2022-11-08 19:46:01 +02:00
approaching_accept_traffic_until.html.heex Improve approaching accept_traffic_until e-mail (#3660) 2024-01-02 13:18:51 +01:00
cancellation_email.html.eex new copy for the cancellation email (#3422) 2023-10-13 14:14:42 -03:00
check_stats_email.html.eex Some changes to the onboarding email copy (#3392) 2023-10-11 09:38:40 -03:00
create_site_email.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
dashboard_locked.html.eex Remove business tier feature flag (#3632) 2023-12-14 11:25:46 -03:00
enterprise_over_limit_internal.html.eex Changes to the emails as discussed (#3540) 2023-12-06 12:02:22 +00:00
error_report_email.html.eex Show user feedback form on server errors (#2617) 2023-01-25 15:15:41 +01:00
existing_user_invitation.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
google_analytics_import.html.heex Add multiple imports per site (#3724) 2024-02-14 09:32:36 +01:00
invitation_accepted.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
invitation_rejected.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
new_user_invitation.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
over_limit.html.eex Remove business tier feature flag (#3632) 2023-12-14 11:25:46 -03:00
ownership_transfer_accepted.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
ownership_transfer_rejected.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
ownership_transfer_request.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
password_reset_email.html.eex Add unubscribe link to transactional emails 2020-08-04 12:44:54 +03:00
site_member_removed.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
site_setup_help_email.html.eex Bugfix: available features for expired trials, no subscriptions (#3740) 2024-02-01 08:15:04 +01:00
site_setup_success_email.html.eex Bugfix: available features for expired trials, no subscriptions (#3740) 2024-02-01 08:15:04 +01:00
spike_notification.html.eex small addition to spike_notification email 2022-11-10 16:08:16 +02:00
trial_one_week_reminder.html.eex Remove business tier feature flag (#3632) 2023-12-14 11:25:46 -03:00
trial_over_email.html.eex Lock traffic notifications (#3641) 2023-12-28 08:42:27 +01:00
trial_upgrade_email.html.eex Remove business tier feature flag (#3632) 2023-12-14 11:25:46 -03:00
two_factor_disabled_email.html.heex Implement UI for 2FA setup and verification (#3541) 2023-12-06 12:01:19 +01:00
two_factor_enabled_email.html.heex Implement UI for 2FA setup and verification (#3541) 2023-12-06 12:01:19 +01:00
welcome_email.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
yearly_expiration_notification.html.eex improvements to the email copy (#3756) 2024-02-05 18:35:40 +01:00
yearly_renewal_notification.html.eex improvements to the email copy (#3756) 2024-02-05 18:35:40 +01:00