Skip to content

Feature: monthly analytics digest email with opt-in subscription #302

Description

@DominicBM

Summary

Users should be able to opt in to receive a monthly email digest summarizing their hub's key analytics. This lets hub staff share dashboard highlights with colleagues, administrators, and stakeholders who do not have dashboard accounts — lowering the barrier to data-informed conversations about collection use.

Motivation

The dashboard requires a login to view any data. Many hub staff who would benefit from a monthly summary (directors, collection managers, grant writers) are unlikely to log in regularly on their own. A well-formatted email digest makes the data accessible without requiring an account, and is easy to forward internally.

Proposed Content

The monthly digest email (sent in the first few days of each month, covering the prior month) would include for the recipient's hub:

  • Item count and contributor count — current snapshot
  • Website sessions and users — for the prior month, with month-over-month change
  • Top item views — most-viewed catalog items during the month (title, contributor, view count)
  • Click-throughs — total, with month-over-month change
  • Top search terms — the searches that surfaced hub content most often
  • Wikimedia activity — page views and files in use (if the hub participates)
  • Link to full dashboard — deep link to the hub's overview page for the same month

Content should degrade gracefully per section if data is unavailable for a given month (e.g., gap in GA4 coverage — see #301).

Subscription Model

  • Opt-in only, per user. No user is subscribed by default.
  • Add a monthly_digest boolean column to the users table (default false).
  • Users manage their subscription from their account/profile page.
  • Admin users may be able to view and manage subscriptions for all accounts on their hub.
  • Consider also allowing non-account subscribers (e.g., a director's email address added by a hub admin) — this would require a separate digest_subscriptions table with email + hub + unsubscribe token, rather than piggy-backing solely on the users table.

Delivery

  • Scheduled via EventBridge (consistent with how other periodic jobs are handled in this app — see Audit and schedule all cache rebuild jobs (Wikimedia, GA4 warm-up, S3 hub stats) #291).
  • Sent via the existing ActionMailer / SES infrastructure (UserMailer already exists with a working welcome email as reference).
  • One email per subscribed address per hub. If a user has access to multiple hubs (admin accounts), send a combined digest or one email per hub — TBD.
  • Include a one-click unsubscribe link (required for CAN-SPAM compliance regardless of opt-in status).

Design Considerations

  • Email should be readable as plain text but include an HTML version with basic formatting (table of key metrics, bolded numbers).
  • Avoid embedding charts or images — they are unreliable across email clients. Present data as a structured summary table.
  • Each metric should include a "vs. prior month" comparison where available.
  • The email should be clearly branded as coming from DPLA and link back to the dashboard for the full picture.

Decisions Needed

  • Confirm send date within the month (e.g., 5th of each month for prior month's complete data)
  • Confirm whether non-account subscribers (email-only) should be supported from the start or in a later iteration
  • Decide on combined vs. per-hub emails for admin users
  • Confirm which metrics are highest priority to include (consult hub partners)
  • Determine whether hubs can customize the digest (e.g., suppress sections they don't care about)

/cc @megannp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions