Skip to content

[Maybe] Campaign open/bounce/click tracking via webhooks #1

@0xheartcode

Description

@0xheartcode

Overview

Add delivery event tracking (opens, clicks, bounces) for email campaigns. Currently campaigns are fire-and-forget — we send but don't know what happens after.

What's needed

  • campaign_events table — per-recipient event log (campaign_id, subscriber_email, event_type, timestamp)
  • Webhook endpointsPOST /api/webhooks/ahasend and POST /api/webhooks/resend with signature verification
  • Provider-side config — register webhook URLs on AhaSend/Resend dashboards
  • Stats rollup — aggregate into campaign-level open rate, bounce rate, click rate
  • UI — per-campaign stats view (maybe a detail page or expandable row)

Notes

  • Both AhaSend and Resend support webhook events, but payload formats and signature verification differ
  • Requires a publicly accessible URL (won't work on localhost without a tunnel)
  • The existing campaigns table already has recipient_count — this extends it with delivery metrics
  • Could be a simple count columns approach or a full normalized events table depending on how granular we want

Status

Undecided — parking this for now. May implement later depending on need.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions