Skip to content

notifications: enable SendGrid click tracking on notification emails#56

Merged
dylanjeffers merged 1 commit into
mainfrom
notifications/email-click-tracking
Jun 6, 2026
Merged

notifications: enable SendGrid click tracking on notification emails#56
dylanjeffers merged 1 commit into
mainfrom
notifications/email-click-tracking

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Summary

Explicitly enable click tracking on notification emails so SendGrid rewrites links and emits click events. Previously sendEmail.ts set no trackingSettings, so click data depended on the SendGrid account-global toggle rather than code.

trackingSettings: {
  clickTracking: { enable: true, enableText: true },
  openTracking: { enable: false },
}

Why

The notifications-dashboard already has the full email-analytics pipeline: a signature-verified SendGrid Event Webhook → email_events → hourly aggregation into announcements.email_clicked + a "top clicked links" UI. That pipeline is fed by SendGrid click events, which only fire when click tracking rewrites links. Making it explicit here removes the implicit dependency on account settings.

Open tracking is disabled on purpose: Apple Mail Privacy Protection pre-fetches the open pixel for ~half of traffic, making opens noise. The dashboard already ignores email opens and uses click rate as the trustworthy signal.

This is the send-side half of email-click parity with push opens; the dashboard ingestion/aggregation/UI already exists.

Testing

  • tsc --noEmit clean for apps/notifications/src (pre-existing @types/babel__traverse node_modules errors are unrelated).

🤖 Generated with Claude Code

Notification emails set no trackingSettings, so whether SendGrid rewrites
links and emits `click` events depended on the account-global tracking
toggle. The notifications-dashboard already ingests those click events
(SendGrid Event Webhook → email_events → email engagement analytics), so
make click tracking explicit per-message instead of implicit.

Open tracking is disabled on purpose: Apple Mail Privacy Protection
pre-fetches the open pixel for ~half of email traffic, making opens
unreliable. The dashboard intentionally ignores email opens and treats
click rate as the trustworthy signal, so we don't pay for open-pixel noise.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dylanjeffers dylanjeffers merged commit 129a4fc into main Jun 6, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant