Overview
Email Tracking logs every transactional email your Vendure server sends. It wraps the @vendure/email-plugin sender, so opens and clicks are tracked without per-handler wiring, and your own plugin code can send through EmailTrackingService for the same tracking.
What it records:
- Each send: recipient, subject, type, the related order, customer and invoice, the SMTP reply and Message-ID, in the
email_logtable. - Every event, raw: one
email_eventrow per send, delivery, deferral, bounce, complaint, unsubscribe, open and click, never deduplicated, with its source, time, hashed IP, approximate location, email client and classification. - Classification: each open and click is
human_likely,machine_likelyorunknown, with reason codes such asgmail-proxy,ampp(Apple Mail Privacy Protection),safelinksandbot-ua. It is advisory: nothing is blocked. - Delivery from your provider: Postmark, SendGrid, Mailgun and Amazon SES webhooks, each verified with the provider's own signature scheme.
- Bounces and complaints: a status update, and for hard bounces and complaints the address joins the suppression list, which every later email is checked against at send.
The log, opens and clicks, the suppression list, bounces and complaints, each order's email list and the customer Emails tab are free; per-template rates, CSV export, the order activity timeline with the PDF evidence report, and provider delivery, deferral, unsubscribe and engagement events need a licence (see Free and licensed).
Release notes for every version are on the changelog page.
Install
One package, one line of config, and one new table. The fastest way is the bundled installer:
Or by hand:
Restart Vendure and compile the admin UI. The Email Log page appears under Customers, every order page gets an Email activity panel, and every customer page an Emails tab.
email_log.machineCount (int, default 0). With synchronize: false, generate a migration or add it with the DDL in the package README ("Upgrading to 0.17.0") before upgrading.email_event. With synchronize: false, generate a migration or run the DDL in the package README ("Upgrading to 0.16.0"). Until the table exists the plugin keeps working as 0.15.4 and logs a warning.Admin UI tour
The Email Log page is mounted at /admin/extensions/email-log (Customers → Email Log).
Click Details on any row to expand it. You'll see:
- Header block: from, to, BCC, subject and context
- SMTP block: Message-ID, SMTP reply and any error
- Open and click history: every open and click with its time, approximate location, email client and classification
Order activity
Every order page shows an Email activity panel with a summary and the latest events. Open full activity leads to the order's timeline, which merges the order's email events with Vendure's own order history: state changes, payments, fulfilments, refunds, cancellations and notes. Filter by emails, opens, clicks, delivery, order and payment, or notes; the page loads 100 events at a time, with Load more. The buttons export a CSV, open the PDF evidence report and, for roles with the ExportEmailEvidence permission, a full JSON export.
Customer Emails tab
Every customer page gets an Emails tab: what was sent to that customer, with links to each order and its activity.
Provider delivery webhooks
Point your email provider's event webhook at your own server, and the plugin records deliveries, deferrals, bounces, drops, complaints and unsubscribes from it. Each provider has its own URL and is verified with its own signature scheme:
| Provider | URL | How it is verified |
|---|---|---|
| Postmark | /email-track/webhook/postmark | HTTP Basic auth with the username and password you set |
| SendGrid | /email-track/webhook/sendgrid | Signed Event Webhook: ECDSA over the timestamp and the exact request body |
| Mailgun | /email-track/webhook/mailgun | HMAC-SHA256 with your webhook signing key, a timestamp window and a replay check |
| Amazon SES | /email-track/webhook/ses | The SNS message signature, checked against Amazon's certificate, and your topic ARN |
Configure only the providers you use. An unknown provider gets 404, and a provider that isn't configured, or a request that fails verification, gets 401. Each provider event is stored once, however often the provider retries it. Hard bounces and complaints add the address to the suppression list; soft bounces and deferrals never do. A delivered event moves the email to delivered, but never over a bounce or complaint.
Opens and clicks reported by the provider are ignored by default, because the plugin's own pixel and redirector already count them. Set recordEngagement: true to store them as events too.
IP enrichment (optional)
Off by default: without this option the plugin makes no third-party calls. When you switch it on, the IP address of each open and click is looked up for its network details (ASN, organisation and the proxy, VPN, datacentre and mobile flags), which also sharpen the human/machine classification.
- Only the IP address (and your API token, if the provider needs one) is sent, after the event is stored, so a lookup never holds up an email, a pixel or a redirect.
- Private and reserved addresses are skipped, results are cached for 24 hours, and a per-minute budget is kept.
- ip-api.com without a key uses its free endpoint, which is plain HTTP and for non-commercial use only under ip-api's terms; the plugin warns about this at boot.
Order activity and the evidence report
The order timeline is also available over HTTP, with a licence or during the evaluation, for roles with ReadOrder and ReadCustomer on the order's channel:
The Order activity and delivery evidence report PDF lists the order, its customer and payment state, the email summary and the full timeline, with a note on how to read IP locations and machine-likely opens. It prints a SHA-256 of the timeline, so the document can be matched to a later JSON export. Private order notes are left out unless you ask for them.
Exports and the PDF are sent with Cache-Control: private, no-store, so a CDN never keeps them.
Suppression list
The plugin maintains an email_suppression table: recipients who should never be sent to. It is filled automatically by hard bounces and complaints from the bounce webhook and the provider webhooks, and you can add entries manually.
The suppression list is free and enforced at send for every email, whether it goes through TrackingEmailSender (the EmailPlugin) or EmailTrackingService: when a send is attempted for a suppressed recipient, the row is written to email_log with status='suppressed', and no SMTP call is made. A password reset is still sent, so a suppressed customer can always get back into their account.
The suppression endpoints are admin endpoints: call them with an admin session (cookie or Authorization: Bearer token). Listing needs ReadCustomer; adding and lifting need UpdateCustomer.
Adding entries manually
Lifting a suppression
Listing the table
Bounce webhook
If your own postmaster integration or DSN parser reports bounces, POST them to /email-track/bounce, signed with your bounceWebhookSecret:
status is bounced or complained. A bounce must carry "bounceType":"hard" or "bounceType":"soft"; anything else is refused with 400. A soft bounce is recorded but never suppresses. The matching email_log row is updated and, for hard bounces and complaints, the recipient joins the suppression list, recipient by recipient.
sha256= prefix is accepted too). The secret is bounceWebhookSecret, or a signingSecret you configured; with neither, the endpoint answers 503. On a private network only, allowUnauthenticatedBounceWebhook: true accepts unsigned requests.Per-template analytics
With a licence or during the evaluation. For an aggregated view of how each email type performs, hit:
Returns:
CSV export
With a licence or during the evaluation, the list endpoint has a CSV mirror. Same filters, same shape:
Up to 50 000 rows per call. Cells that a spreadsheet would run as a formula are quoted.
Free and licensed
Every new installation has every feature on for its first 14 days, with no card and no licence key. After that the plugin keeps running in its free tier for as long as you like; a licence keeps the licensed features on. If a licence lapses, the licensed features stop and nothing is deleted: settings and data are kept, and a key switches them back on.
Free tier
- A log of every e-mail with its SMTP reply and retries
- Open and click recording; bots and Apple Mail Privacy Protection are kept out of the counts
- The suppression list, enforced at send for every e-mail (password resets are still sent), with an admin page
- Hard bounces and complaints from the bounce webhook (a hard or soft bounceType is required) and from verified provider webhooks
- Each order's e-mails on its order page, and an Emails tab on every customer
- Tracking on/off switches and trusted proxies
- Privacy export and erase by address
- The dashboard widget, with failed or bounced e-mails
Licensed (and the first 14 days)
- Open and click rates per e-mail template
- CSV export of the e-mail log
- The order activity timeline and the PDF evidence report
- Delivery, deferral, unsubscribe and engagement events from your e-mail provider
- The weekly report and set-up checklist
Buy a monthly, annual (two months free) or lifetime licence from the plugin page, or click Subscribe (or Buy lifetime) on the licence banner of the plugin's admin page: checkout opens in a new tab and the key installs itself within a minute, renewals included. Already have a key? Paste it into the same banner (Activate), no redeploy, or set HULO_LICENCE_KEY_EMAIL_TRACKING; the environment key wins when both are present.
HTTP endpoints
| Method | Path | Description |
|---|---|---|
| GET | /email-track/open/:token.gif | Public pixel: records a signed open, then serves a 1×1 GIF |
| GET | /email-track/click/:token?u=<url>&s=<sig> | Public click redirector: checks the signed destination, records the click, then 302s |
| POST | /email-track/webhook/:provider | Provider delivery events (postmark, sendgrid, mailgun, ses), verified by the provider's signature |
| POST | /email-track/bounce | Bounce / complaint webhook, signed with X-Signature |
| GET | /email-track/orders/:orderId/activity | Admin: the order's activity timeline (licensed) |
| GET | /email-track/orders/:orderId/activity.csv | Admin: redacted CSV of the timeline (licensed) |
| GET | /email-track/orders/:orderId/activity.json | Admin: redacted JSON; ?full=1 needs ExportEmailEvidence (licensed) |
| POST | /email-track/orders/:orderId/evidence-link | Admin: a five-minute signed link to the PDF evidence report (licensed) |
| GET | /email-track/orders/:orderId/evidence.pdf | The PDF evidence report, through its signed link |
| GET | /email-track/log | Admin: paginated log with filters |
| GET | /email-track/log/summary | Admin: status totals |
| GET | /email-track/log/:id | Admin: full detail, incl. opens and clicks |
| GET | /email-track/log/stats/by-template | Admin: per-template aggregates (licensed) |
| GET | /email-track/log/export.csv | Admin: CSV export (licensed) |
| GET | /email-track/suppression | Admin: list suppressions |
| POST | /email-track/suppression | Admin: add a suppression |
| DELETE | /email-track/suppression/:recipient | Admin: lift a suppression |
Troubleshooting
Opens look like they come from Google or Microsoft
Many email clients fetch images through a proxy (Gmail's image proxy, Apple Mail Privacy Protection) and security gateways click links to scan them (Microsoft Safe Links, Proofpoint). Those events are stored and classified machine_likely with the reason, so you can tell them apart from real customers.
Clicks answer 400 "Invalid redirect target"
The redirector only follows its own signed links. A link copied from an email sent before a signing secret existed only redirects to your own hosts; add other domains to clickRedirectAllowedDomains to keep those working.
A provider webhook answers 401
The provider isn't configured in providerWebhooks, or its signature doesn't verify: check the credentials or key, and that nothing in front of Vendure (a proxy or WAF) rewrites the request body.
The suppression list isn't catching recent bounces
Make sure your provider webhook or bounce webhook reaches the server, and that the bounce carries the messageId your SMTP transport returned at send time; the plugin stores it as smtpMessageId on the email's row.