Skip to content

fix(email): email tracking fixes, analytics endpoints, SDK regen, settings validation#57

Merged
dviejokfs merged 8 commits intomainfrom
fix/email-tracking-fixes-2
Apr 2, 2026
Merged

fix(email): email tracking fixes, analytics endpoints, SDK regen, settings validation#57
dviejokfs merged 8 commits intomainfrom
fix/email-tracking-fixes-2

Conversation

@dviejokfs
Copy link
Copy Markdown
Contributor

Changes

Email Tracking

  • Gmail proxy detection: parseUserAgent now identifies Google image proxy UAs instead of misreporting as "Firefox"
  • Global tracking endpoints: GET /emails/events/stats and GET /emails/events for the Analytics tab (previously 404)
  • email_id in events: TrackingEventResponse includes email_id field, fixing analytics crash
  • Back navigation: email detail → settings now returns to "Sent Emails" tab, not default

UI

  • Headers empty state: shows "No custom headers were set" instead of blank
  • Event type aliases: open/click render correctly alongside opened/clicked

Settings

  • External URL validation: server rejects URLs with #, ?, non-http schemes, or invalid format; client shows inline validation errors and surfaces server errors in toast

SDK

  • Node SDK regenerated: includes tracked_html_body, track_opens, track_clicks, TrackingEventResponse, TrackedLinkResponse, EmailTrackingResponse

Google proxies all email images through googleusercontent.com servers,
sending a UA like "Mozilla/5.0 ... Firefox/11.0 (via ggpht.com
GoogleImageProxy)". The parseUserAgent function now checks for
GoogleImageProxy/ggpht.com before browser detection, displaying
"Gmail (Google Proxy)" instead of incorrectly showing "Firefox".
Add /emails/events/stats and /emails/events endpoints to the
temps-email plugin so the Analytics tab works. Previously these
routes were only in the unregistered temps-email-tracking plugin.

- GET /emails/events/stats: aggregated open/click/bounce stats
- GET /emails/events: paginated list of all tracking events
- Fix event type aliases in EmailAnalytics component
- Add OpenAPI annotations to global events endpoints
- Regenerate Node SDK from latest OpenAPI spec
- New types: TrackingEventResponse, TrackedLinkResponse,
  EmailTrackingResponse, tracked_html_body, track_opens, track_clicks
- New SDK functions: getEmailTracking, getEmailEvents, getEmailLinks,
  trackOpen, trackClick
Server: reject external URLs that don't start with http(s)://, contain
# or ? characters, or aren't parseable. Sanitize by trimming whitespace
and trailing slashes.

Client: add react-hook-form validation with the same rules, show inline
error messages, and surface server validation errors in toast.
@dviejokfs dviejokfs merged commit 0ef587e into main Apr 2, 2026
10 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