* implement fmt::Display for ReportType enum
* add report type to email subject and body
* remove `vs yesterday` from email
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
instead of going back a week for end date, we should ideally generate
report starting 1 week before today and end it yesterday night
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
The dry_run option is useful for testing the connection to the umami
analytics server. Enabling this option will generate a report but will
not send an email.
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
* create new `[app]` configuration block with debug, report_type
* move max_concurrent_jobs under `[app]` configuration
* add documentation for what each option does, and reorder options
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
* add `[app]` configuration with report_type daily or weekly
* add option to enable debug logging
* move max_concurrent_jobs under [app] config
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
The email report showed the day before's date instead of yesterday, which
is incorrect for the data the report is being generated for. Setting the
date to `time_range.end` fixes this visual issue.
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
* remove unused imports, mark the ones needed for tests as allowed
* remove borrowed expression from format!
* replace match with a simple if condition
* use clamp() instead of .max().min()
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
Can currently send emails with the following data:
- Pageview and visitor statistics
- Engagement metrics (bounce rates, time spent)
- Top referrers and traffic sources
- Geographic distribution of visitors
- Browser and device breakdowns
Will make it configurable in the future versions
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>