Hulo Global home
For Vendure Vendure edition: for Vendure 3.5+ shops, installed with npm. Also available for WordPress: Email Tracking for WordPress
For Vendure

Email Tracking for Vendure

Every transactional email your Vendure server sends, recorded as raw events: verified provider webhooks, human-vs-machine classification and a per-order activity timeline with a PDF evidence report.

Install on Vendure: add the package with npm, yarn or pnpm, then register EmailTrackingPlugin in vendure-config.ts. All steps

npm

npm install @huloglobal/vendure-plugin-email-tracking

yarn

yarn add @huloglobal/vendure-plugin-email-tracking

pnpm

pnpm add @huloglobal/vendure-plugin-email-tracking

Register it in vendure-config.ts

// vendure-config.ts
import { EmailTrackingPlugin } from '@huloglobal/vendure-plugin-email-tracking';

export const config: VendureConfig = {
  plugins: [
    EmailTrackingPlugin.init({
      publicBaseUrl: 'https://shop.example.com',
      licenceKey: process.env.HULO_LICENCE_KEY_EMAIL_TRACKING,
    }),
    // ... your other plugins
  ],
};

What it does

Built for production from day one.

Drop-in tracker for every email your Vendure server sends. It wraps the @vendure/email-plugin pipeline, and your own plugin code can send through EmailTrackingService for the same tracking. Every send, delivery, bounce, open and click is stored as its own event in the email_event table, never deduplicated, so the audit trail stays intact. Delivery events can come straight from Postmark, SendGrid, Mailgun or Amazon SES, each verified against the provider's own signature scheme. Every open and click is classified human_likely, machine_likely or unknown with reason codes (Gmail image proxy, Apple Mail Privacy Protection, Microsoft Safe Links, Proofpoint, bot user agents, …), so you can tell a real customer from a security scanner. On every order page, an activity timeline merges the emails with Vendure's own order history, and exports to CSV, JSON or a PDF evidence report.

Universal capture

Every email produced by @vendure/email-plugin (order confirmation, password reset, OTP, invoice and the rest) is logged automatically through TrackingEmailSender, with no per-handler wiring. Inject EmailTrackingService for sends from your own plugin code and get the same tracking.

Signed open + click tracking

A 1×1 pixel and a click redirector, both signed with a per-install secret, so forged opens and clicks are not counted and the redirector cannot be pointed at another site. Per-link tokens (EmailLinkService.issueLinkToken()) record exactly which link was clicked, and sensitive links (password reset, invoice access) are stored only in redacted form. Token-like query parameters are redacted in every recorded URL.

Raw event timeline

One email_event row per send, delivery, deferral, bounce, complaint, unsubscribe, open and click, with its order, customer, channel, source, time, Message-ID, hashed IP, location, client and classification. Raw events are never merged; a daily cap per email keeps one leaked link from filling the table.

Human / machine / unknown classification

Every open and click is scored with the licence SDK's classifier. Reason chips show why an event looks machine-driven: gmail-proxy, ampp (Apple Mail Privacy Protection), safelinks, proofpoint, bot-ua, headless, prefetch and, with IP enrichment on, datacentre, vpn, proxy and tor. The classification is advisory: nothing is blocked.

Provider delivery webhooks

Delivered, deferred, bounced, dropped, complaint and unsubscribe events from Postmark (Basic auth), SendGrid (ECDSA over the exact request body), Mailgun (HMAC with a timestamp window and replay check) and Amazon SES through SNS (full message-signature check against Amazon's certificate). Unknown providers get 404, unconfigured ones 401, and each provider event is stored once however often it is retried. Bounces, drops and complaints are recorded on the free tier, and hard bounces and complaints add the address to the suppression list; deliveries, deferrals, unsubscribes and engagement events need a licence.

IP enrichment (opt-in)

Off by default, so the plugin makes no third-party calls. Switch it on to look up the network of each open and click (ASN, organisation, proxy, VPN, datacentre and mobile flags) at ipinfo.io, ip-api.com or a lookup you supply. Private addresses are skipped, results are cached, a per-minute budget is kept, and lookups never hold up an event.

Order activity on every order page

Every order page lists the order's e-mails on the free tier. With a licence, a panel on the order page and a full activity page merge 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, 100 events at a time with Load more. IP-derived locations carry a cautionary note.

CSV, JSON and PDF evidence exports

With a licence: a redacted CSV and JSON of the timeline, a full JSON export behind the new ExportEmailEvidence permission, and an "Order activity and delivery evidence report" PDF opened through a five-minute signed link. The PDF prints a SHA-256 of the timeline, so it can be matched to a later JSON export.

Per-customer Emails tab

Every customer page gets an Emails tab listing what was sent to them, with links to each order and its activity.

Suppression list, free

Hard bounces and complaints auto-add to the suppression table, and you can search, add and remove addresses in the admin. Every later email to those addresses is refused at send and logged as status=suppressed (a password reset is still sent); soft bounces never suppress.

Per-template analytics

With a licence: open rate, click rate and click-to-open ratio per email type: order confirmation, OTP, invoice, password reset and your own types.

Signed bounce webhook

POST bounce and complaint events to /email-track/bounce from your own postmaster integration, signed with an X-Signature HMAC-SHA256 header. A bounce must say bounceType hard or soft (anything else is refused with 400); only hard bounces and complaints suppress, recipient by recipient.

Admin UI: Email Log

Filter by recipient, customer, order, status, type and date range, and expand any row for its open and click history. With a licence, export CSV; exports are never cached by a CDN.

Works with any SMTP transport

Gmail, SES, SendGrid, Postmark, Mailgun or plain SMTP: plug TrackingEmailSender() into your email-plugin config.

MySQL, MariaDB & PostgreSQL

The plugin follows whatever database your Vendure dbConnectionOptions use — no configuration. Verified against PostgreSQL 17; MySQL/MariaDB installs are unchanged.

Buy & activate from the admin

The 14-day evaluation starts by itself, with no card. Subscribe or buy lifetime from the plugin's admin page — checkout opens in a new tab and the key installs itself within a minute, renewals included. The same card shows your plan, first-charge date and a Manage billing link to the Stripe portal (update card, cancel, switch plan). Already have a key? Paste it into the same banner. No .env edit, no redeploy; environment keys still take precedence for infrastructure-as-code setups.

Weekly report, set-up checklist & dashboard widget

With a licence (or during the first 14 days), every Monday the plugin emails whoever runs the store a short report of what it did that week — real numbers from your own database, week-over-week, with the next set-up step to take — and the plugin page opens with a set-up checklist that hides itself once everything is done. Change the recipient, send a test or switch the report off from the plugin's Settings tab (needs the host's SMTP_* settings). If the licence lapses, the report stops and the checklist is hidden; their settings are kept. The dashboard widget (Dashboard → Add widget) is free and shows the plugin's recent numbers.

One-click in-app updates

When a new version ships, an update banner shows current → latest with a What's-new link to the changelog. "Update now" installs the registry-verified release via your project's own package manager (yarn/npm/pnpm auto-detected) and gracefully restarts under pm2/systemd. Disable with HULO_SELF_UPDATE=off.

Install

Four steps, five minutes.

Add the package

Or run the one-line installer that does steps 1–3 for you:

curl -sSL https://huloglobal.com/vendure-plugins/email-tracking/install.sh | bash

Prefer to do it by hand?

npm

npm install @huloglobal/vendure-plugin-email-tracking

yarn

yarn add @huloglobal/vendure-plugin-email-tracking

pnpm

pnpm add @huloglobal/vendure-plugin-email-tracking

Register it

In your vendure-config.ts:

// vendure-config.ts import { EmailTrackingPlugin } from '@huloglobal/vendure-plugin-email-tracking'; export const config: VendureConfig = { plugins: [ EmailTrackingPlugin.init({ publicBaseUrl: 'https://shop.example.com', licenceKey: process.env.HULO_LICENCE_KEY_EMAIL_TRACKING, }), // ... your other plugins ], };

Compile the admin UI

Add the extension to your compileUiExtensions call so the plugin's page appears in the admin:

// compile-admin-ui.ts import { compileUiExtensions } from '@vendure/ui-devkit/compiler'; import { EmailTrackingPlugin } from '@huloglobal/vendure-plugin-email-tracking'; compileUiExtensions({ outputPath: path.join(__dirname, 'admin-ui'), extensions: [EmailTrackingPlugin.uiExtensions], });

Run the migration

The plugin registers its own entities. Generate and run the migration like any other:

yarn migration:generate AddEmailTrackingPluginTables yarn migration:run

That's it. Restart Vendure and the plugin's page is in the admin with every feature on for 14 days — no card, no key. To keep it all on afterwards, open the page and click Subscribe (first charge when the 14 days end) — the key installs itself, no .env edit, no redeploy.

Free tier vs licensed

Try the whole thing, keep the core for free.

Every new install has every feature on for its first 14 days, with no card and no key. After that the free tier keeps working indefinitely, and a licence keeps the licensed features on. If a licence lapses, the licensed features stop and nothing is deleted.

Free tier (after the 14 days)

  • 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

First 14 days + licensed

  • 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
Start 14-day free trial →

HTTP endpoints

Every route exposed.

GET/email-track/open/:token.gifPixel: records a signed open, then serves a 1×1 GIF
GET/email-track/click/:token?u=<url>&s=<sig>Click redirector: checks the signed destination, records the click, then 302s
POST/email-track/webhook/:providerProvider delivery events: postmark, sendgrid, mailgun or ses, verified by the provider's signature
POST/email-track/bounceBounce / complaint webhook, signed with X-Signature (HMAC-SHA256)
GET/email-track/orders/:orderId/activityAdmin: the order's activity timeline (ReadOrder + ReadCustomer; licensed, as are the exports below)
GET/email-track/orders/:orderId/activity.csvAdmin: redacted CSV of the timeline
GET/email-track/orders/:orderId/activity.jsonAdmin: redacted JSON; ?full=1 needs ExportEmailEvidence
POST/email-track/orders/:orderId/evidence-linkAdmin: a five-minute signed link to the PDF evidence report
GET/email-track/orders/:orderId/evidence.pdfThe PDF evidence report, opened through its signed link
GET/email-track/logAdmin: paginated log with filters
GET/email-track/log/summaryAdmin: status totals
GET/email-track/log/:idAdmin: full detail, incl. opens and clicks
GET/email-track/log/stats/by-templateAdmin: per-template open and click rates (licensed)
GET/email-track/log/export.csvAdmin: CSV export (licensed)
GET/email-track/suppressionAdmin: list suppression entries
POST/email-track/suppressionAdmin: manually add a recipient
DELETE/email-track/suppression/:recipientAdmin: lift a suppression
GET/email-track/licence/statusAdmin: licence + evaluation + update status
POST/email-track/licence/activateAdmin: activate a licence key from the admin UI
POST/email-track/update/runAdmin: one-click in-app update + graceful restart
GET/email-track/digest/settingsAdmin: weekly report recipient, last/next send
POST/email-track/digest/send-testAdmin: email this week's report to you now
GET/email-track/setupAdmin: set-up checklist (what is still to do)
GET/email-track/widgetAdmin: headline figures for the dashboard widget

FAQ

Common questions.

How do I get a licence key?

Buy one on the web with Stripe Checkout: monthly licence for Email Tracking, annual licence for Email Tracking (two months free) or lifetime licence for Email Tracking. You'll receive the JWT key by email. Paste it into the plugin's admin settings (Activate) — no redeploy — or set it as HULO_LICENCE_KEY_EMAIL_TRACKING in your .env if you prefer config-as-code; the env key wins when both are present.

Does it work without a key?

Yes. Every install runs with all premium features on for its first 14 days — no card, no licence key, nothing to configure — so you can judge it on your real traffic. After that it keeps working in the free tier. To keep them, click Subscribe on the plugin's admin page: the first charge is taken when the 14 days end (or 49 hours after checkout, if that is later), you can cancel any time before then, and the licence installs itself.

Which databases are supported?

MySQL, MariaDB and PostgreSQL (verified against PostgreSQL 17). The plugin follows your Vendure dbConnectionOptions automatically — there is nothing to configure.

How do updates work?

The plugin checks the npm registry daily. When a newer version exists, the admin dashboard shows an update banner with a What's-new link to the changelog and an "Update now" button that installs the registry-verified release via your own package manager and gracefully restarts under your process supervisor. Prefer manual control? Copy the install command instead, or set HULO_SELF_UPDATE=off.

Where is data stored?

In your Vendure database: the plugin keeps its data in its own tables there (added with a migration). Hulo Global never receives your customer data: the plugin sends our licence server only the licence check-ins and usage counts described under “Do the plugins call home?”. None unless you switch them on. Optional IP enrichment looks up the IP address of each open and click at ipinfo.io, ip-api.com or a lookup you supply; Amazon SES webhooks fetch Amazon's signing certificate to verify each message.

Will it survive a Vendure upgrade?

It supports Vendure >=3.5.0 <4.0.0 (its peer dependency), and current releases are built and tested against Vendure 3.8.2 before they are published. A boot-time compatibility check emits a non-fatal warning if @vendure/core is outside that range, so upgrades to a future 3.x are safe to try. The 4.0 line will be tested and re-declared once its changelog lands.

Changelog

What's new.

Latest release: v0.18.0, 16 November 2026. Full changelog for Email Tracking for Vendure

Show changes

v0.18.0NewLatest

Fixed

  • Channel admins no longer see or lift other channels' suppressions. The suppression list is install-wide, and its admin routes showed every address on it, and let any administrator with Update Customer on any channel lift any entry, including those of other channels' customers. An administrator whose active channel is not the default channel now lists and removes only that channel's entries, and an entry they add is stamped with their channel. Default-channel administrators see and manage the whole list, as before. Enforcement at send is unchanged (every entry applies to every channel).

Changed

  • Dependencies: development dependencies refreshed to their latest minor/patch versions (@nestjs/common 12.5, nodemailer 6.10, typeorm 0.3.30, typescript 5.9, vitest 2.1.9 and types).

Notes

  • The plugin sends no e-mails of its own apart from the weekly report, which is built by @huloglobal/vendure-licence-sdk. It never wraps or restyles the e-mails your store sends; it only adds the open pixel and click redirects you have switched on.
v0.17.0New

Parity with the WordPress plugin: the core of email tracking is free, the bounce webhook is strict, and the suppression list is enforced on every send. One new column (email_log.machineCount; README → Upgrading to 0.17.0).

Changed — tiers

  • Free in every tier: open and click recording, the suppression list (enforced at send) and the per-order email list on the order page.
  • Premium: the weekly email report (the scheduler skips its run without a licence or the evaluation; its settings are kept) and the set-up checklist (GET /email-track/setup, the digest preview, test send and settings changes answer 402; digest/settings reports locked).
  • PREMIUM_FEATURES now lists exactly what is gated: per-template rates, CSV export, the order activity timeline and PDF evidence report, provider delivery / deferral / unsubscribe / engagement events, the weekly report, the set-up checklist. It is exported from the package index.

Fixed

  • B1 — the bounce webhook is strict and per recipient. Every status except complained used to be recorded as a bounce, so a relay forwarding a delivery or an open put a working address on the suppression list, and a comma-joined To list was suppressed as one string. Now only bounced with bounceType hard / soft (and their synonyms) or complained is accepted — anything else is 400 and changes nothing; a hard bounce or a complaint suppresses the address the report names (recipient, which must be one of the email's recipients) or the email's only recipient, and nobody when several were addressed and none is named. The answer adds suppressed. recordBounceReport() returns { matched, suppressed }; recordBounce() keeps its boolean.
  • B7 — suppression is enforced in the EmailPlugin pipeline. It was only checked in sendTracked(), and only with premium; TrackingEmailSender never checked it. Both paths now drop suppressed addresses (the email is not sent when nobody is left: a suppressed row and event, no job retry), in every tier. A password reset is exempt (suppressionExemptTypes, default ['password-reset']), decided by the type the sender gave, never the subject. Suppression rows are always bare lower-cased addresses.

Added

  • Email type from the sender. The plugin wraps the EmailPlugin's send job (AsyncLocalStorage), so TrackingEmailSender logs the event handler's type and the order from its template variables instead of guessing from the subject (subject guessing stays only as the label of mail sent outside the job). withEmailContext() labels your own sends.
  • Bot-aware counts. Opens and clicks classified as machine traffic (scanners, link checkers, bots, and — new — opens from Apple's network, reasons apple-network + ampp) are recorded but not counted in openCount / clickCount; email_log.machineCount counts them. Image-proxy opens (Gmail, Yahoo, Outlook) still count.
  • Suppression list admin UI (search, add with reason and note, remove); GET /email-track/suppression takes q, take, skip and returns a real total; POST accepts exactly one address. The GraphQL mutation validates the same way.
  • Tracking switches: track opens / track clicks (trackOpens, trackClicks, and Email Log → Settings). Off: no pixel / no link rewriting on new mail, nothing recorded for new hits; old links keep working.
  • Trusted proxies: trustedProxies (IPs / CIDR, IPv4 and IPv6) plus an admin-editable list. When set, proxy headers are believed only from those addresses and X-Forwarded-For is walked past them.
  • Privacy export / erase by address: GET /email-track/privacy/export (ReadCustomer) and POST /email-track/privacy/erase { email, confirm: true } (DeleteCustomer), with an admin card. The suppression entry is kept on erase and reported as retained.
  • Dashboard widget: a fourth figure, failed or bounced (7 days).
  • Free order card: the order's email list (latest 20) with the premium note for the timeline and the evidence report.
  • GET / POST /email-track/settings (POST: SuperAdmin). A save that cannot be written to hulo_plugin_prefs is reported (500), never shown as saved.

Tests

  • Unit: recipients, strict bounce parsing, per-recipient targets, CIDR / trusted proxies, bot counting, the sender context through the real Vendure EmailProcessor, switches, premium digest, B7 on TrackingEmailSender.
  • PostgreSQL corpus: every new statement, plus the suppression IN lookup, machineCount and privacy export / erase end to end.
  • e2e (sql.js): strict bounces, per-recipient suppression, free suppression at send, suppression admin, switches, privacy, premium reports, the free order list and widget. New MariaDB e2e (ET_E2E_DB_*): settings persisted in hulo_plugin_prefs, machine counting, suppression + bounce + privacy, the weekly report gate.
v0.16.4NewSecurity
  • Security Admin REST routes refuse a Shop-API session on Vendure 3.8+. Vendure 3.8 binds every session to the API it was created on and refuses Shop-API sessions on the Admin API (GHSA-5fpx-9m35-w745), but it does not check REST routes added by plugins: an administrator's storefront session still carried their admin permissions into the Email Tracking admin REST routes (Email Log, exports, order Email activity, settings). Those routes now also require a session created on the Admin API (isAdminApiSession from the licence SDK 0.15.6, the same rule as Vendure's own AuthGuard). The admin UI is unaffected; administrators logged in before the 3.8 upgrade log in again once, as Vendure already requires. No change on Vendure 3.5 to 3.7.

Compatibility

  • Tested with Vendure 3.8.2 (NestJS 12, @nestjs/graphql 14, Apollo Server 5), as well as 3.5 to 3.7. The peer range stays @vendure/core >=3.5.0 <4.0.0; nothing here needs 3.8.
  • Requires @huloglobal/vendure-licence-sdk ^0.15.6.
v0.16.3New

Honest email outcomes on the order card and in the Email Log. No schema change and no stored status is rewritten: every view now reads a send attempt together with the other attempts of the same email (README → Send attempts).

Fixed

  • The order card said "N delivered" where nothing can report a delivery. Only a provider webhook ever sets delivered, so a shop sending through plain SMTP (Gmail, for one) always read "0 delivered". The "Email activity" card and the activity page now count emails accepted by the mail server, and show "delivered" only when a provider webhook is configured and its deliveries are recorded (not on the free tier; summary.deliveryEvents on GET /email-track/orders/:orderId/activity). The evidence PDF says "accepted by the mail server" and "delivery not reported (no provider webhook is configured)".
  • An email still being sent looked sent. Its email_log row is written before SMTP starts, as sent. Until the reply or the error is recorded (and for at most 15 minutes) it now reads "Sending…": on the order card and timeline, in the exports and the PDF, and as state sending in the Email Log, whose Sent card no longer counts it (nor do By template and the weekly figures). When nodemailer's reply cannot be captured, the sender records an empty one, so a finished send never reads as sending. A send that still has no reply after 15 minutes was cut off (for example by a worker restart mid-SMTP): it reads "No reply recorded" (state unknown) and is not counted as sent. When the send job runs it again, the two attempts are linked like a retry ("No reply recorded, retried", then "Sent after 1 retry"). Rows from before the event timeline began (no reply was recorded before 0.14.3) keep their stored status.
  • The "legacy" badge ("sent before 0.16.0") appeared on emails sent after the upgrade: on any email without a send event yet. Only emails created before the install's first send event are legacy now; a later one without a send event is read from the email log as kind log, without the badge.
  • A temporary refusal read as a red "Send failed", and its retry as an unrelated email. An SMTP 4xx reply and a connection or timeout error are temporary: the attempt reads "Deferred, retrying" while Vendure's send job can retry it, and the next attempt of the same email (same channel, order, type, recipient and subject, created within 15 minutes of the failure) is linked to it: "Deferred, retried" (retriedBy, "retried as email #…" in the detail) and "Sent after 1 retry" (retryOf). "Send failed" now means a permanent refusal (SMTP 5xx or any other error) with no later attempt, or that the retries are over (no new attempt within 15 minutes, or the sixth attempt failed: "Send failed after 5 retries"). The card counts each email once ("1 email (2 attempts)"), with sending, retrying, deferred, no reply recorded, failed and suppressed figures when there are any.
  • Email Log: the Failed card and the list it opened disagreed (the card counted the last 30 days, the list every email ever: 1 against 127 on one shop), and By template counted failed attempts as sent. The cards and the list now share one period and filter set (a new period choice: 7, 30, 90 or 365 days, or all time; all time when opened for a customer or an order), and each card opens exactly the emails it counts. Failed counts emails that failed for good; new In progress (sending, or waiting for a retry) and Retried (refused attempts that were sent again) cards, and a No reply card when there are any; Sent leaves out sends in flight and those without a reply; Delivered says "not reported" without a provider webhook, and "not recorded on the free tier" there. By template's Sent counts the emails the mail server accepted, including those that later bounced, were deferred or drew a complaint (the open and click rates are over them), and Failed the emails that failed for good, in the admin GraphQL huloEmailStatsByTemplate too. A search by recipient, type, customer or order keeps the chosen period and says so ("Searching the last 30 days", with Search all time). Every refused attempt in the period is read with its retry, newest first, so a long period ("Last 365 days", "All time") counts a retried email as retried however many were refused before it.
  • The sending and retry windows ran on this process's clock while the timestamps they compare with are written by the database. They now use the database's own time (LOCALTIMESTAMP on MySQL, MariaDB and PostgreSQL), so a database in another time zone no longer turns a send in flight into a sent one or a temporary refusal into a failure; the Email Log period and By template count back from it too.
  • SES: every send was stored as failed. The SES transport's reply is the message id (0100018b…), which was read as reply code 100018. A reply without an SMTP reply code is now sent, in TrackingEmailSender and sendTracked. Rows stored before 0.16.3 keep their failed status.
  • "Emails tracked" in the weekly report, the dashboard widget, the licence banner and the usage stats counts the emails the mail server accepted; refused, suppressed and in-flight attempts were counted, which also lowered the open rate. The figure is lower than an earlier version's for the same emails; the heartbeat and evaluation stats carry the plugin version, which tells the two apart (no stats key was added: the licence server lists every key in its e-mails).

Added

  • Refresh on the order card, which also refreshes itself every 10 seconds, for up to 3 minutes, while an email is sending or waiting for its retry (a failed refresh keeps what is shown).
  • GET /email-track/log and log/export.csv: state= (one or several of sending, sent, delivered, deferred, bounced, complained, suppressed, retrying, retried, failed, unknown) and fromDays= (days, or all). List rows carry state, attempt, retryOf and retriedBy; the CSV export ends with a state column. status= still filters the stored status.
  • GET /email-track/log/summary takes the list's filters (recipient, type, customerId, orderCode, fromDays — default 30, or all) and returns sending, retrying, retried, unknown, deliveryEvents and deliveryEventsReason (no-webhook or free-tier when deliveries cannot be reported); failed and deferred count what was not retried, and total still counts every row. The period is bound as a date, as the list binds it.
  • Order activity: summary.emails has attempts, sending, retrying, deferred, unknown, failed and suppressed, and total and sent count emails (a retried one once); the card and the activity page show the non-zero ones. deliveryEvents is false on the free tier, which does not record a provider's deliveries. Send items have sendState, retryOf and retriedBy. The evidence report's timeline SHA-256 covers them, so it differs from a 0.16.2 export of the same timeline. The PDF marks rows read from the email log after the event timeline began ("from email log") and explains "Sending…", "No reply recorded" and the retry labels.
v0.16.2New

Package metadata

  • The license field is now AGPL-3.0-only, matching LICENSE, which grants the GNU Affero General Public License version 3 (it said AGPL-3.0-or-later). Published npm builds remain under the separate commercial licence described in LICENSE. No code changes.
v0.16.1New

Fixed

  • PostgreSQL: activating a licence key from the admin failed. The admin controller's licence-store wrapper dropped the options argument, so the upsert that stores an activated key had no conflict columns and threw on PostgreSQL: the key applied until the next restart, the request answered 500 and the key was never stored. It is now passed through (MySQL/MariaDB were not affected).
v0.16.0NewSecurity

Delivery evidence: every email event is now recorded as its own row, the order page shows an email activity timeline with exports and a PDF evidence report, and provider delivery webhooks are verified and ingested. One new table (email_event); email_log is unchanged. Hosts on synchronize: false must create the table first — see README → "Upgrading to 0.16.0". Without new options the plugin behaves as 0.15.4 apart from the new event rows and admin panels and the changes listed below: no new third-party calls, no provider webhook accepted, same link format. One counting change: opens and clicks through bare (unsigned) ids are recorded as unverified events only and no longer counted in email_log (see Security).

Added

  • Event timeline (email_event). One row per event, never deduplicated: send outcomes (sent, failed, deferred, suppressed) from TrackingEmailSender and sendTracked; every pixel open and every click — up to 100 of each per email per UTC day (10 through bare ids), after which one marker row (reason events-capped, with the count it saw) stands for the rest of the day while signed hits keep incrementing the email_log counters; a server process records one email's hits one at a time, so a burst cannot pass the count together; bounces from /email-track/bounce; provider events; manual suppressions by an administrator. Rows carry the order / customer / channel links of the email, the canonical IP as stored (raw, or hashed per hashIpsInHistory) plus ipHash (hashes are HMACs keyed with ipSalt, or with the signing secret when ipSalt is unset), the local GeoLite2 location, the parsed client, the clicked URL (secrets and email addresses redacted) with link index and text, the bounce or SMTP detail and a small sanitised provider payload (never a message body; the recipient only as a keyed hash, and every email address in SMTP / provider text replaced by <address>, message ids excepted). Writes are best-effort: a failed event row never affects a send, a pixel or a redirect. The existing email_log counters and opensJson / clicksJson are written as before, except for bare-id hits (see Security).
  • Human / machine / unknown classification of every open and click (classification + reason codes such as gmail-proxy, safelinks, bot-ua, datacentre, vpn) from the licence SDK classifier; re-classified when IP enrichment adds network flags. A hit through a bare (unsigned) id is unverified instead — never human or machine — in the JSON, the UI and the PDF.
  • Provider webhooks at POST /email-track/webhook/:provider for postmark (HTTP Basic auth), sendgrid (signed event webhook), mailgun (signed HTTP webhooks) and ses (Amazon SES through SNS), configured with the new providerWebhooks option. Mapped events: delivered, deferred, hard and soft bounces (SES Permanent / Transient, SendGrid bounce / blocked, Mailgun failed permanent / temporary, Postmark HardBounce / SoftBounce / Transient …), complaints, dropped / rejected and unsubscribes; provider opens and clicks only with recordEngagement: true (recorded, never counted in email_log; a click on one of the plugin's own tracked links is stored as its destination, redacted, with its link index and text). Retries are idempotent (unique dedupeKey from the provider's event id); when a status or suppression update fails, the event row is removed again and the answer is 500, so the retry is processed in full. Events are matched to the email by a correlation header the sender adds only for configured providers (SendGrid X-SMTPAPI unique_args, Mailgun X-Mailgun-Variables, Postmark X-PM-Metadata-hulo-log-id, SES X-SES-MESSAGE-TAGS; the value is the email_log id with an HMAC of the install's signing secret, so a provider account shared with another shop cannot link its events to your emails), then the Message-ID, then the provider id parsed from the SMTP reply. The JSON headers are handed to nodemailer prepared, so they go out as raw JSON rather than RFC 2047 encoded-words; the Postmark metadata key is read whatever its case. Hard bounces, complaints and drops for a bad address (SendGrid: exactly "Bounced Address", "Invalid" or "Spam Reporting Address") add the recipient to the suppression list — also when no email matched; soft bounces, deferrals and other drops ("Invalid SMTPAPI header", "Unsubscribed Address", …) never do; unsubscribes are recorded only. Bounces and complaints are processed in every tier, delivered / deferred / unsubscribe / engagement events need premium access. Per-IP limits of their own (providerWebhooks.rateLimit): failed requests spend a failure allowance (default rateLimit, 60 a minute) that is checked before a body is read; verified requests spend only a per-provider verified allowance (default 1 200 a minute).
  • delivered status on email_log, with a fixed precedence for every status update (sent < deferred < delivered < bounced < complained < failed < suppressed), applied in one guarded UPDATE that always equals the precedence: a provider "delivered" moves sent / deferred to delivered and never overwrites bounced, complained or failed. A provider drop for a reason other than a bad address moves only sent / deferred to failed.
  • IP enrichment (opt-in, off by default) with the new ipEnrichment option: { provider: 'ipinfo', token }, { provider: 'ip-api', key? } or { provider: 'custom', lookup(ip) }, plus cacheTtlMs (default 24 h) and maxLookupsPerMinute (default 40 for the free ip-api endpoint, else 120). Asynchronous after the event row is written; adds country, region, city, ASN, organisation, timezone and proxy / VPN / Tor / datacentre / mobile flags, with the location merged as a unit (GeoLite2 first; the provider's city only for the same country); private and reserved addresses (incl. the IPv4-mapped, NAT64 and 6to4 forms of private IPv4) are never sent; only the validated, canonical address is looked up (no %zone suffixes), cached per address; over-budget lookups are dropped, not queued; 5 s timeout; every value clamped to its column (the AS number only). A boot warning explains the free ip-api endpoint's terms (HTTP, 45/min, non-commercial).
  • Order activity — GET /email-track/orders/:orderId/activity merges the order's email events, legacy rows synthesised from email_log for emails sent before 0.16.0 (marked legacy; no backfill runs) and Vendure's order history (state, payment with amounts, fulfilment, refund, cancellation, modification, coupon, customer changes and notes — each note whole —, private ones included). Filters all / emails / opens / clicks / delivery / order / notes, cursor pagination (100 by default, order=desc for the latest first) and a header summary (order, customer, total in the host's MoneyStrategy precision, payment state, emails sent / delivered / opened with the first open / clicked / bounced or complained — from the email_log counters, which bare-id hits never move — and human vs machine opens and clicks, unverified ones apart). History is read in pages no larger than the API's list limit, and a response says historyUnavailable: true (the page and the PDF show a notice) when it could not be read. Needs ReadOrder and ReadCustomer, is scoped to the admin's channel (404 outside it) and is premium (402 unlicensed).
  • Exports: activity.csv (redacted: IP as stored, sensitive URLs redacted, no payloads; every cell quoted with the formula-injection guard; UTF-8 byte-order mark), activity.json (redacted, with timelineSha256) — both take ?filter=, name it in the file name and then return timelineSha256: null —, activity.json?evidence=1 (&internalNotes=1): exactly the items the PDF prints, with the hash printed on it, and activity.json?full=1 — every stored column, provider payloads and full user agents — behind the new ExportEmailEvidence permission (Settings → Roles; SuperAdmin has it).
  • "Order activity and delivery evidence report" (PDF) from POST /email-track/orders/:orderId/evidence-link: a 5-minute HMAC-signed URL (order id, expiry, admin user id and the internal-notes choice, signed with the active signing secret) to GET …/evidence.pdf, which needs no session, so it opens in a new tab under bearer-token auth. A4, generated by a built-in dependency-free PDF writer: order and customer header, generated-at (UTC), generated-by and whether internal notes are included, summary (bare-id hits on a line of their own, not counted in any figure), the timeline table, a "How to read this report" note, page numbers and the SHA-256 of the canonical JSON of the printed items, which matches a later activity.json?evidence=1 export of the unchanged timeline. Private (internal) order notes are left out unless the link was minted with { "internalNotes": true } (then printed as "Note (internal)"); order history of a type the plugin does not know shows its type only. Clicks name their link ("Link #2: …"). A cell longer than a page (about 85 lines, some 4 000 characters of text) is cut with "… (truncated, N more characters: see activity.json)" — N counts every character after the lines shown, spaces and line breaks included — its author line kept; the SHA-256 line and its explanation are never split across pages. Characters outside WinAnsi print as a stand-in (→ as ->, Ł as L) or, for other scripts, as ?.
  • Admin UI: an "Email activity" card on the order detail page (summary, latest ten rows with repeated proxy opens folded into one, Open full activity, Evidence report (PDF); shown to admins with ReadOrder and ReadCustomer); a full page at Email Log → order activity (/extensions/email-log/orders/:orderId) with filters, classification badges ("Unverified" for bare-id hits) and reason chips, approximate location under a cautionary note, the clicked link, Load more, Export CSV (of the active filter), notes with their line breaks, PDF with an "Include internal notes" choice and — for admins with ExportEmailEvidence — Full export (downloads named as the server names them, date included), and an error state with Try again; the per-customer Emails tab on the customer detail page (the README promised it; it now exists; its seven columns fit a 1280 px screen); an "activity" link on Email Log rows linked to an order. On an unlicensed install the premium screens show their notice without calling a premium endpoint (no 402 in the browser console). Dates follow the admin UI locale; status colours meet WCAG AA, also in the dark theme, and the premium notice's link is underlined in the notice colour; the page title is the page's h1; the activity page fits a 390 px screen (its table scrolls inside its box, the summary cards wrap long addresses).
  • Link metadata for wrapped mail: the send event stores each rewritten link's index, anchor text (120 characters), whether it carries a secret, a keyed URL fingerprint and whether the email's tokens are signed, so click events show which link was clicked. URLs and signatures are unchanged; links in emails already sent keep working.
  • A boot warning when the database's clock (LOCALTIMESTAMP, read through the driver) and the process's differ by two minutes or more — different time zones make the timeline mix two clocks. README → Upgrading: run both in the same zone, UTC recommended.
  • Exports: EmailEvent, EmailEventService, OrderActivityService, exportEmailEvidencePermission, the option and event types. The plugin module exports EmailTrackingService, EmailEventService, EmailLinkService and OrderActivityService, so a host plugin that imports EmailTrackingPlugin injects the plugin's own instances (README → Universal capture).

Changed

  • Recorded click URLs (the event and clicksJson) have secrets redacted: https://host/path?[redacted] when the URL carries user info, a query parameter whose name holds a secret (token, code, key, sig, signature, auth, password, reset, otp, session, sid, jwt, apikey, pin, magic, nonce, hash, ticket, …), a parameter whose value is a URL that does (?next=/reset?token=…, also encoded), a key=value fragment, or an account-action path (reset, verify, confirm, login, magic, auth, invite, unsubscribe, …) with a query; token-like path segments after such a segment become [redacted]. The redirect still goes to the real URL. The Email Log detail shows click history written before 0.16.0 redacted the same way.
  • /email-track/bounce applies the status precedence: a soft bounce no longer turns a bounced, complained or delivered email back into deferred, and a hard bounce no longer overwrites a complaint. Each call is also recorded as an event (a retried call with the same facts once).
  • /email-track/bounce takes application/json only (415 otherwise) and at most 100 KB (gzip / deflate still inflated) — what the global parser accepted before, minus form posts.
  • A bare (unsigned) open / click id is accepted for every email without a 0.16.0 send event saying its links were signed (every email sent before 0.16.0, signed or not). While a signing secret exists (always, unless the licence store was unavailable at boot) such a hit is an unverified event only — reason unsigned-token, never enriched — and no longer increments openCount / clickCount, sets firstOpenedAt / firstClickedAt or joins opensJson / clicksJson; a bare id of an email whose own links were signed is not recorded at all. The pixel and the own-host redirect are still served. Without any secret, every link is a bare id and is counted as before.
  • The click redirect answers first and records the click afterwards (as the pixel always did), so a slow database or lookup never holds the customer up.
  • The GeoLite2 lookup (when geolite2-redist is installed) loads its database once per process and waits for it at most one second: its updater resolves only after reaching GitHub, and when GitHub could not be reached every public-IP open went unrecorded and click redirects hung (also in 0.15.x).
  • The SMTP reply no longer overwrites a status a provider event set while the send was in flight: the reply's Message-ID and text are always stored, its status (deferred / failed) only replaces the optimistic sent, in one guarded UPDATE (sendTracked and TrackingEmailSender).
  • CSV exports (log/export.csv and the order activity CSV) quote every cell and start with a UTF-8 byte-order mark.
  • The Email Log page counts every status in its period total (it left out delivered and suppressed); Sent shows sent + delivered and filters on both, with new Delivered, Complained and Suppressed cards. GET /email-track/log/summary returns total, delivered and suppressed; status on the list and CSV export takes a comma-separated list. Its two tables scroll inside their own box, so the page no longer stretches the admin wider than the screen (it did from 390 px up to 1280 px).
  • The plugin's admin screens (Email Log, order panel and page, customer tab, dashboard widget) send the admin's active channel token and, on bearer-token hosts, the bearer token with every REST call, and no longer trigger Vendure's generic red error notification for expected answers (402 unlicensed, 403 role); they show their own messages. The premium notices say "subscribe or activate a key".
  • The retention sweeper also prunes email_event (older than days — at least 3 — the events of emails maxRows removes, and under maxRows the unlinked events older than the oldest email kept), in the same batches.
  • EmailTrackingService.recordClick() takes an optional fifth argument with the link's index and text, and recordOpen() / recordClick() an optional last { signed }; existing callers are unaffected. Its constructor's new EmailEventService dependency is optional: a host plugin that lists EmailTrackingService in its own providers, as 0.15.x hosts do, still boots, and its instance writes the timeline through an event writer of its own.
  • Opens and clicks are recorded on sqlite / sql.js too (Date parameters are bound as UTC strings there; MySQL, MariaDB and Postgres are unchanged).
  • The premium feature list (licence banner, weekly report) and the free-tier boot warning name the new premium features (provider delivery, deferral, unsubscribe and engagement events among them; bounces, complaints and drops stay free).
  • A boot warning when ipSalt is not set: the email_log IP hashes then use the public default salt. The option docs no longer say hashed IPs cannot be de-anonymised.
  • README "Buy": every install gets the 14-day evaluation with all features on and no card (since 0.15.2); prices unchanged.

Fixed

  • The Email Log's Export CSV (GET /email-track/log/export.csv) never answered since it was added in 0.3.0: GET /email-track/log/:id, declared before it, took the request and replied 400 "Invalid id". The fixed log/… routes are declared first now, and log/:id takes digits only (anything else is 404).
  • A fresh MySQL / MariaDB database with synchronize: true failed to boot ("Duplicate key name 'IDX_d58a6a97b688ff39bf86a0f051'"): email_link.linkToken was declared unique twice (since 0.14). It is declared once now; existing tables keep their index — see README → "Upgrading to 0.16.0" for the redundant PostgreSQL constraint a generated migration drops.
  • Retention on PostgreSQL pruned at most one batch (5 000 rows) per table per sweep, because TypeORM reports every DELETE there as affecting 2 rows; each batch is now counted from the rows it selected.
  • Email Log: the hero's Help and Refresh buttons were white on Vendure 3.7's light button background (unreadable); they are outlined now. "cust #N" on rows without an order linked to /customers/:id, a route Vendure 3 does not have; it opens the customer's Emails tab.
  • Security Webhook verification design. Unknown provider → 404; every known provider slug, configured or not, gets the same body checks (415 / 413 / 408 / 400), and a provider that is not configured and a failed verification both answer 401 — after the same body read, with an empty body and identical headers (Connection: close) — so nothing reveals which providers are enabled. An unconfigured SendGrid, Postmark or Mailgun also runs the signature check a configured one would, against throwaway credentials, so the time the check takes does not reveal it either. Per-IP limits: only rejected requests spend the failure allowance (checked before a body is read), verified ones a per-provider allowance of their own, so junk cannot throttle real bounces and complaints. Postmark: Basic credentials compared in constant time (both halves always compared). SendGrid: ECDSA P-256 / SHA-256 over the timestamp header plus the exact raw request body, key accepted as base64 DER or PEM, anything but an EC P-256 key refused — never a re-serialised body; a timestamp more than 72 hours from now is refused, so a captured request cannot be replayed later. Mailgun: HMAC-SHA256 over timestamp + token in constant time, timestamps more than 15 minutes off rejected, and a bounded replay cache refuses a token seen before — the token is reserved the moment it verifies, so concurrent requests replaying one signature with other event data are refused too (released if processing fails, so Mailgun's retry passes; the cache is per server process). Amazon SES: the SNS message signature is verified (SignatureVersion 1 SHA1withRSA, 2 SHA256withRSA) over the canonical string for its Type; the body's TopicArn must be on ses.topicArns and its Timestamp at most 24 hours old before anything is fetched; SigningCertURL must be https on exactly the topic's own sns.<region>.amazonaws.com(.cn) with a /SimpleNotificationService-<hex>.pem path (no other host under amazonaws.com, such as an S3 bucket called "sns"), written in canonical form (no :443, dot-segments, encoded dots or embedded tabs: each spelling would be its own cache entry and fetch), and is fetched with a 5 s timeout, no redirects and a 64 KB cap enforced while streaming, then cached; a failed fetch is remembered for 15 s, concurrent messages share one fetch, and at most 2 new fetches a minute per client address and 60 a minute in all run (an expired cached copy of the same certificate serves meanwhile), so unsigned messages naming made-up certificate URLs from one address that knows a topic ARN cannot use up the fetches the real SNS deliveries need after a restart or a certificate rotation (it would take 30 addresses); the certificate must be within its validity dates. The spoofable x-amz-sns-topic-arn header is never trusted, and a SubscribeURL is fetched only after verification, only on the topic's own SNS host with Action=ConfirmSubscription for the same topic (autoConfirmSubscription: false logs it for manual confirmation instead).
  • Security Exact raw bodies, read only when needed. The plugin registers a dependency-free body capture for /email-track/webhook and /email-track/bounce as beforeListen middleware (the way Vendure's StripePlugin does). Before reading a byte it answers 404 for an unknown provider and 429 for an address that has used up its failure allowance (and, on the bounce route, 429 over the rate limit), and it closes the connection rather than draining. Webhook bodies, by slug and never by configuration: application/json (text/plain for SNS only), no compression, at most 1 MB (SendGrid, Postmark), 320 KB (SES) or 256 KB (Mailgun). SendGrid and Postmark carry their signature or credentials outside the body, so their body is parsed only after verification: an unauthenticated request never costs a JSON parse. Mailgun and SNS sign fields inside the body, so it is parsed first — after a byte scan that refuses (400, charged to the failure allowance) a body nested deeper than 32 levels or holding more than 1 000 arrays and objects, the shapes that make JSON.parse slow (a real Mailgun event has about 25, an SNS envelope 4). Bounce bodies: application/json, at most 100 KB (compressed bytes counted too). Every body must arrive within 10 s (408). The bounce HMAC is checked over the exact bytes; a signature over the compact JSON form, which is what 0.15.x verified, is still accepted so existing senders keep working.
  • Security No secrets at rest from provider clicks. Provider-reported click URLs (SendGrid url, Postmark OriginalLink, Mailgun url, SES click.link) are unwrapped from the plugin's own tracked links and redacted before they are stored, so a reset or magic-link token never reaches the database, the exports or the PDF. The full export of legacy click history is redacted too.
  • Security Keyed hashes. The email_event IP and recipient hashes are HMACs keyed with ipSalt or, when it is not set, the install's signing secret (never the public default salt once a secret exists). The link fingerprints in the send event are HMACs keyed with the signing secret and taken over the redacted URL of a sensitive link, so a short code cannot be recovered from an export or a database copy.
  • Security CSV injection. Every exported cell is quoted (no list separator — comma or semicolon — can split it into a formula cell), and a leading = + - @ is neutralised also after spaces or invisible characters.
  • Security IP enrichment input. Only the validated, canonical address is looked up or used as the cache key (a %zone suffix is refused); NAT64 and 6to4 addresses are classified by the IPv4 address they embed.
  • Security Unsigned ids. Opens and clicks through bare ids cannot pass as evidence: while a signing secret exists they are unverified events only (never enriched, at most 10 per email per type per day), never counted in email_log — so enumerating ids cannot move the opened / first open / clicked figures of the Email Log, the order summary or the evidence report — and ignored entirely for an email whose links were signed.
  • Security Storage. Opens and clicks stored per email are capped per UTC day (100 each; 10 through bare ids), so one tracked URL, or enumerated ids, cannot grow email_event without bound.
  • Security Privacy. Email addresses in SMTP / provider text are replaced by <address> before an event is stored (bounce diagnostics often quote the recipient); a recorded URL whose query holds an address is redacted.
  • Security Evidence report contents. Private (internal) order notes, and the raw data of order history the plugin does not know, stay out of the PDF — a document meant to be handed to others — unless notes are explicitly asked for; that choice is bound into the link's HMAC.
  • Security The evidence-report link is checked in constant time; a tampered, re-pointed or expired link gets 403, and one claiming a longer lifetime than five minutes is refused.
  • Security No admin response is cached. Every admin REST response, refusals included — the Email Log list, detail, summary and CSV export, the order activity JSON / CSV, the evidence link, settings, licence and status routes — and the evidence PDF send Cache-Control: private, no-store; every admin REST response also carries the licence SDK's security headers (the README promised those, but only the weekly-report preview had them). GET /email-track/log/:id takes digits only: since 0.1.0, /email-track/log/1.csv (or .pdf, .css, .js, .jpg) returned the full detail of email 1 — recipient, subject, SMTP reply, IPs, user agents, opens and clicks — as uncached JSON, under a URL that a CDN caching by file extension (Cloudflare's default) could store and serve to anyone after a signed-in admin merely opened a crafted link to the shop.
v0.15.4New

Documentation

  • The README now shows the plugin logo, hosted on huloglobal.com so it displays on npm and GitHub alike, linking to the product page. No code changes.
v0.15.3NewSecurity
  • Security Open redirect through signed click links. The <id>.<hmac> token on /email-track/click/:token?u=… authenticated only the email, not the destination, so anyone holding one tracked email (or any link from it) could swap u for any http(s) URL and use the shop's domain to redirect to a phishing site whenever clickRedirectAllowedDomains was empty (the default). Rewritten links now carry s, an HMAC over the token and the destination; a link without a valid s (bare legacy ids, and links in emails sent before 0.15.3) only redirects to the shop's own hosts (publicBaseUrl, trackedHosts, clickRedirectAllowedDomains). Behaviour change: old emails whose links point at third-party sites now get a 400 for those links; add the domains to clickRedirectAllowedDomains to keep them working.
  • Security Client IP from X-Forwarded-For. With trustedIpHeaders including x-forwarded-for, the left-most entry (written by the client itself) was used, so a fresh spoofed value per request bypassed the per-IP rate limit on the pixel, click and bounce endpoints and poisoned stored open/click IPs. The right-most public hop (the one your proxy appended) is used now.
  • Security Channel scoping of single-row reads. GET /email-track/log/:id and the huloEmailLog / huloEmailStatsByTemplate admin queries ignored the channel scope the list views apply, so a channel admin with ReadCustomer could read another channel's emails (recipient, subject, context, opens and clicks) by id. They now see only their channel; the default channel still sees everything.
v0.15.2

Changed

  • Every install now gets a 14-day evaluation with all features on and no card (granted by the HULO licence server). The licence banner's buttons read Subscribe: during the evaluation the first charge falls on the day it ends, so there is no second free trial.
v0.15.1

Fixed

  • Decode HTML-escaped equals signs as well as ampersands before wrapping tracked links, so password-reset and other query-string URLs retain their parameters.
v0.15.0

Retention pass: the plugin now tells the merchant what it did for them and walks them through finishing the set-up. One new table (hulo_plugin_prefs, shared by every HULO plugin; created fail-soft at boot). Requires @huloglobal/vendure-licence-sdk 0.15.0.

Added

  • Weekly report. Every Monday at 08:00 (server-local) the worker emails last week's figures — emails tracked, opens, link clicks, bounces and complaints, open rate — each against the previous week, plus next steps taken from the set-up checklist and a link to the admin page. Sent through the host's SMTP_SERVER/SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD/SMTP_PASS and SMTP_FROM environment (the plugin has no mailer of its own); without SMTP nothing is sent and nothing breaks. The recipient defaults to the licence's customer email, else the address given for the trial reminder. Admin endpoints under /email-track/digest/: GET settings, POST settings ({enabled?, recipient?}), POST send-test ({to?}) and GET preview (HTML). The Email Log page has a "Weekly report" card (toggle, recipient, last/next send, Send me a test, Preview).
  • Set-up checklist at the top of the Email Log page and GET /email-track/setup: sender wrapped (a log row in the last 30 days), publicBaseUrl set to a public host, bounce webhook secret configured, first open or click recorded. The undone items become the weekly report's tips. "Hide" (per browser) once everything is done; the card returns if an item comes undone.
  • Dashboard widget "Email Tracking" (Dashboard → Add widget): emails tracked, opens and clicks for the last 7 days, the licence notice when a trial or key is about to end, and a link to the page. Backed by GET /email-track/widget.
  • Usage stats to the licence server. emailsTracked, emailOpens, emailClicks, emailsBounced and openRatePct for the last 30 days (numbers only, no addresses) go with the evaluation ping and, from this version, with the daily heartbeat too, so renewal mail can say what the plugin did. HULO_HEARTBEAT_DISABLED=true still stops the heartbeat.
  • Licence banner. GET /email-track/licence/status now carries notice (trial ending / key expiring / evaluation ended), premiumFeatures and recentStats (top three non-zero 30-day figures). The licensed banner shows "renews automatically — current key valid until <date>" for subscriptions and the notice in an amber strip; the trial banner has "Email me before it ends" (POST /email-track/eval/remind-me {email}, forwarded to the licence server and kept as the report's default recipient), the premium feature list and a "So far: …" line; the free banner shows the same with "During your evaluation: …" once the evaluation has run.
  • By template table (30 days: sent, opened, open rate, clicked, click rate, bounced, failed) under the summary cards, and an Export CSV button that downloads the current filter. Both are premium: on the free tier they show an unlock chip instead of an error toast.
  • Every "needs a licence" failure (HTTP 402, or an error code of premium-feature, licence-required or licence_required) renders one message in the admin: "<what you tried> needs a licence — start the free trial or activate a key at the top of this page."

Changed

  • One update banner instead of two. "Dismiss" now remembers the dismissed version in the browser; the banner returns for the next release.
  • The help drawer no longer promises a resend action that does not exist; the third card describes the per-message open and click history.

Fixed

  • The second update banner was fed by a status request the page never made, so it could never appear; removed with its dead code.
v0.14.3

Follow-up to the 0.14.2 hardening pass. No new tables or columns.

Added

  • Signing secret on by default. Without signingSecret a random per-install secret is generated once at boot and stored in hulo_licence_store (key vendure-plugin-email-tracking:signing-secret; first writer wins so server and worker sign and verify alike), then applied as if configured. Bare-id links in already-sent emails behave exactly as in 0.14.2 (pixel served, clicks to own hosts only). A boot warning explains that setting signingSecret keeps links valid across reinstalls. A generated secret is never used to authenticate the bounce webhook.
  • Per-link tokens are live. /email-track/click/:token accepts the 64-hex tokens minted by EmailLinkService.issueLinkToken() (?u=…&s=…): the row must exist and be unexpired, and both the HMAC and the stored destination hash must match, so the token binds its URL. Sensitive links are recorded by their redacted form. EmailLinkService signs with the env override, else the plugin's signingSecret.
  • Postgres corpus test (src/pg-corpus.test.ts, runs when HULO_PG_URL is set): every raw SQL statement in src/ is translated by the dialect adapter and executed against PostgreSQL 17 with TypeORM-quoted stand-ins.

Fixed

  • Bounces could not be matched to pipeline mail. TrackingEmailSender delegated to NodemailerEmailSender, which discards nodemailer's result, so rows for order confirmations, OTPs and password resets never had a smtpMessageId/smtpResponse. A CapturingSender subclass keeps the result per send; the row now gets the Message-ID (stored without angle brackets, also for sendTracked) and the SMTP reply, and its status is set from the reply code like sendTracked does.

Changed

  • Retention is now plugin-side: it runs daily on the worker only, deletes email_log in batches of 5 000 (oldest id first, short pause between batches) instead of one unbounded statement, applies maxRows the same way, and prunes email_link rows past expiresAt or older than days.
  • Tests are no longer compiled into dist.
v0.14.2

Reliability and security pass — no new features. Three indexes on email_log and one on smtpMessageId are declared (run your migrations).

Fixed

  • Postgres boot. Date columns were declared as datetime, which TypeORM rejects on Postgres at start-up; they are now portable Date columns. Raw SQL quotes every camelCase column and uses SUM(CASE …) instead of SUM(boolean), so the log, summaries, exports and the GraphQL list work on Postgres.
  • GraphQL huloEmailLogs selected a lastClickedAt column that does not exist and failed on every database.
  • Open redirect. The click redirector no longer redirects for a token it cannot tie to an email; unsigned legacy ids may only redirect to the shop's own hosts (publicBaseUrl, trackedHosts, clickRedirectAllowedDomains); signed links are unchanged. Bare ids must be plain decimals (a 64-hex link token no longer resolves to row 7).
  • A database hiccup no longer blocks the email. The tracking sender now sends untracked when the log row cannot be written, and column caps match the schema (a long subject used to make MariaDB refuse the row and the OTP/password-reset email was never sent).
  • Permissions. Self-update, licence activate/deactivate, purchase and portal links need SuperAdmin (they were reachable with UpdateCustomer). Admins in a non-default channel only see their channel's rows; the sender records the order's channel instead of always channel 1.
  • Bounce webhook is refused without a secret unless allowUnauthenticatedBounceWebhook: true; it is rate limited; Message-IDs match with or without angle brackets; soft/transient bounces (bounceType: 'soft') are recorded as deferred and never suppress the address; suppression inserts are race-safe.
  • Opens and clicks are counted with atomic UPDATE … + 1 statements (concurrent pixel fetches from Gmail's proxy and Apple MPP used to lose increments); the pixel is no longer display:none (Outlook skips hidden images) and no longer carries a same-origin resource policy.
  • Links whose href contains &amp; are decoded before being wrapped, so click-through query strings survive.
  • Admin list/export/summary inputs are validated (400 instead of 500 on bad ids or dates); CSV cells starting with =, +, -, @ are quoted so they cannot run as spreadsheet formulas; suppression reasons are checked against the known set.
  • Deactivating a runtime licence restarts the evaluation client instead of leaving it stopped.
  • Admin UI: the update banner is no longer shown twice, the copy button copies a real @, the restart poll is cancelled on destroy.

Changed

  • retention defaults to { days: 365 } (was: keep everything).
  • New options trustedIpHeaders (proxy headers that may override req.ip; default none) and allowUnauthenticatedBounceWebhook.
  • The list orders by id DESC (same order, uses the primary key).
v0.14.1

Changed

  • Branding. The bundled hulo-global-logo.svg is now the HG wordmark on the HULO black rounded square (the same mark as the huloglobal.com header), with explicit -light and -dark variants alongside the auto-switching default.
v0.14.0

Added

  • Licence & billing card in the admin. Always visible: the current state (free tier, free trial with first-charge date, monthly/annual subscription, lifetime, or master licence) with the actions that apply — start the 14-day free trial or subscribe, buy lifetime, Manage billing (Stripe customer portal: update card, cancel, switch plan) and Upgrade to lifetime (the old subscription stops billing at the end of its paid period). Requires licence SDK ^0.14.0.
v0.13.1

Changed

  • The 14-day free trial is now card-backed. Unlicensed installs run in the free tier; start the trial from the admin banner (monthly or annual → Start 14-day free trial) — Stripe collects a card, nothing is charged until day 15, cancel any time before then, one trial per customer — and the licence installs itself within a minute. The automatic no-card evaluation window is retired (licence SDK ^0.13.0).
v0.13.0

Added

  • Buy licence from the admin. The evaluation / free-tier banner now has a plan picker and a Buy licence button: checkout opens in a new tab and, once payment completes, the licence installs itself — no email round-trip, no .env edit, no restart. Renewed subscription keys are picked up automatically too. New admin endpoints licence/purchase-link and licence/claim-status.

Changed

  • Requires @huloglobal/vendure-licence-sdk ^0.12.0.
  • The 7-day card trial at checkout has been retired: every install already gets the 14-day no-card evaluation, and paid plans now bill from day one.
v0.12.2

Changed

  • Pricing. Email Tracking is now £6.95/month, £69.50/year or £139 lifetime (was £9.95 / £99.50 / £199). README updated; the 14-day evaluation is unchanged.
v0.12.1

Changed

  • Licence SDK ^0.11.0. Master licences (one key that activates every HULO plugin) and hardware-bound keys are now accepted by the runtime licence check.
  • Branding. Refreshed HULO Global logo (inline HG monogram) in the admin UI.
v0.12.0

Added

  • PostgreSQL support. All of the plugin's SQL now runs on Postgres as well as MySQL/MariaDB — the licence SDK's new dialect adapter translates queries transparently at runtime, so no configuration is needed: the plugin follows whatever database your Vendure dbConnectionOptions use. Verified against PostgreSQL 17. MySQL/MariaDB installs are unaffected (byte-identical passthrough).
v0.11.1

Changed

  • The update banner's "What's new" link now opens the plugin's changelog page on huloglobal.com, so you can read exactly what a release contains before updating.
v0.11.0

Added

  • One-click in-app updates. The update banner now has an "Update now" button: the plugin installs the new version via your project's own package manager (yarn/npm/pnpm auto-detected), verifies it landed, and gracefully restarts under your process supervisor (pm2/systemd). Admin-only; the target version is verified against the npm registry; a failed install never restarts anything. Disable with HULO_SELF_UPDATE=off; force restart without a detected supervisor with HULO_SELF_UPDATE=force. Note: a separate worker process picks the update up on its next restart, and the admin UI itself refreshes after your next admin build.
v0.10.1

Added

  • Update notifications in the admin UI. When a newer version is on npm, a dismissible banner shows current → latest with a copy-ready install command and a link to what's new. (Update data comes from the existing daily registry check — no new network calls.)
v0.10.0

Added

  • In-admin licence activation. A banner on the admin page shows the evaluation countdown (or free-tier state) with a paste-your-key box: the key is verified with the exact boot-time checks and activates instantly — no .env edit, no redeploy. Persisted in the shared hulo_licence_store table and restored on boot; env/init keys always take precedence. New licence/status, licence/activate and licence/deactivate admin endpoints.
v0.9.0

Added

  • 14-day full-featured evaluation. Unlicensed installs now get the complete feature set for 14 days instead of the restricted free tier. Premium tracking features now also run during the evaluation window. The clock is anchored server-side (a hashed instance id — no personal data), so reinstalling does not restart it, and it fails open: if the licence server is unreachable the plugin keeps running fully. After the window the plugin drops to the free tier; all configuration is kept and reactivates instantly with a key.
v0.8.2

Added

  • Recipient-email → customerId lookup in TrackingEmailSender. If the subject doesn't contain an order code (password reset, OTP, email verification, account welcome, etc.) the sender now does a case-insensitive Customer.emailAddress lookup so the row still links to the right customer. Combined with 0.8.1's order-code extraction, this means the per-customer Emails view now surfaces every send the customer ever received — order-related and non-order-related.
v0.8.1

Fixed

  • TrackingEmailSender now populates orderCode, orderId and customerId on every EmailLog row it creates. Before this fix, only emails sent by our own service code (which passed those ids in explicitly) had them set — the Vendure email-plugin's built-in order-confirmation, invoice, password-reset etc. handlers do not hand order/customer entities through to the sender, so those rows saved with all three ids as NULL. That broke the per-order and per-customer Emails buttons on the admin (they filter by orderCode / customerId), showing an empty list even though the emails were sent. The sender now extracts the order code from the email subject via a #<code> regex (Vendure's default order-related templates render it there — e.g. "Order confirmation for #S2BZ54TEK91HUUBA"), then looks up the corresponding Order row to backfill orderId and customerId. Best-effort: unmatched subjects fall back to the previous behaviour (envelope-only row).
v0.8.0

Added

  • Boot-time compatibility check via the new SDK helper warnIfIncompatibleVendure(). Logs a non-fatal warning when the runtime @vendure/core version is outside the tested range. Silent when inside; fail-open on unparseable versions.

Changed

  • Peer dep on @vendure/core tightened to >=3.5.0 <4.0.0 — Vendure 3.5, 3.6 and 3.7 are all covered. Anything under 3.5 has never been tested by us; anything from 4.0 upwards is deferred until we've seen the changelog.
  • Uses @huloglobal/vendure-licence-sdk@^0.6.0.
v0.7.0

Added

  • EmailLink entity — per-link metadata for tracked transactional emails. Each clickable link in each email gets its own random 32-byte token. Records the link's type, human label, visible text, position index, template section (main_cta, footer, etc.), destination host, path, and a SHA-256 hash of the full destination URL.
  • EmailLinkService — issues per-link tokens, verifies HMAC signatures on click, looks up link metadata at redirect time. Graceful degradation: if the host doesn't have the migration yet, the redirect still works via signature verification alone; the click event just won't carry server-side link metadata.
  • Sensitive-link handling — isSensitive: true on password-reset, invoice-access, or licence-delivery URLs. The raw destination never lands on an admin-visible event row; only the redacted form and hash.
  • Zero runtime coupling to invoice / support-ticket / order plugins. All foreign-id fields are nullable ints with no FK constraints; hosts without those plugins simply never pass the id.
  • Uses @huloglobal/vendure-licence-sdk@^0.5.0 for the shared classifyEmailEvent() classifier.
v0.6.0

Added

  • Vendure Admin API GraphQL extensions. All of the operator endpoints are now available as first-class GraphQL queries and mutations alongside the existing REST admin endpoints: huloEmailLogs, huloEmailLog, huloEmailStatsByTemplate (paid), huloEmailSuppressions, huloAddEmailSuppression, huloRemoveEmailSuppression.
  • Storefront paths (open pixel, click redirector, DSN webhook) stay REST — they're anonymous, high-frequency, and return non-JSON in some cases. GraphQL was never the right shape for those.
v0.5.0

Changed

  • Relicensed the GitHub source to AGPL-3.0. Published npm builds remain under the commercial licence documented at <https://huloglobal.com/legal/terms/>.
  • npm builds now include Sigstore provenance attestations. Consumers can verify a tarball came from the official source repo with npm view --json <pkg> dist.attestations.
v0.4.3

Fixed

  • Dropped the conflicting display: block on mobile tables that broke the row / cell alignment. Table now scrolls horizontally inside its card at narrow widths.
v0.4.2

Changed

  • 44px minimum tap targets on every interactive element in the admin UI. Buttons, checkboxes, chip filters, expand toggles.
v0.4.1

Changed

  • Comprehensive README refresh — documents the full v0.4 feature set with copy-paste config including every security and retention option.
v0.4.0

Added

  • Signed open + click URLs — when signingSecret is configured, the URLs embed an HMAC tag and forged ids are rejected.
  • Click redirector domain allowlist (clickRedirectAllowedDomains).
  • HMAC verification on the POST /email-track/bounce webhook (bounceWebhookSecret).
  • IP hashing on opens + clicks history (hashIpsInHistory, default true; ipSalt setting).
  • Best-effort MaxMind geo lookup (country / region / city / timezone) on every recorded open and click, surfaced in the admin detail.
  • Rate limiter (60 requests / 60s default) on /open + /click.
  • Security headers on every response via the licence-sdk helper.
  • Opt-in retention sweeper via options.retention.
v0.3.3

Changed

  • Mobile-friendly admin UI — summary cards reflow, filters stack with 44px tap targets, tables overflow-x scroll inside the card. Update banner reflows on mobile.
v0.3.2

Changed

  • Republish targeting @huloglobal/vendure-licence-sdk@^0.2.0.
v0.3.1

Added

  • UpdateChecker integration via the licence-sdk — /email-track/status endpoint returns version + update info, admin UI shows a banner when a new version is available.
v0.3.0

Added

  • Suppression list — new EmailSuppression entity. Hard bounces and complaints auto-add to the table; sendTracked() refuses recipients on the list and writes status='suppressed'. CRUD endpoints (GET /email-track/suppression, POST /email-track/suppression, DELETE /email-track/suppression/:recipient).
  • Per-template analytics — GET /email-track/log/stats/by-template returns open rate, click rate and click-to-open per email type.
  • Device + client detection — every open is classified (Gmail web, Outlook desktop, Apple Mail iOS, Thunderbird, Yahoo, prefetch proxies, bots / scanners). Stored on each open history entry.
  • CSV export — GET /email-track/log/export.csv mirrors the list endpoint's filters (max 50 000 rows).

Changed

  • Admin UI Email Log detail view now renders the full open and click history tables (was just clicks before).
v0.2.0

Added

  • Full per-event open history (opensJson) alongside the existing click history. Capped to the last 50 opens per email — older opens still contribute to openCount. Surfaced as opens: [] on GET /email-track/log/:id.
v0.1.0

Added

  • EmailTrackingPlugin — wraps @vendure/email-plugin and persists every send to the email_log table.
  • TrackingEmailSender — drop-in EmailSender replacement that wraps the default Nodemailer sender and injects an open-tracking pixel and a click redirector into the outgoing HTML.
  • EmailTrackingService — exposed for custom controllers that send transactional email outside the email-plugin pipeline.
  • Public endpoints /email-track/open/:id.gif (1×1 pixel), /email-track/click/:id?u=<encoded> (302 redirect), and /email-track/bounce (webhook hook for DSN parsers).
  • Admin endpoints /email-track/log (paginated list with filters), /email-track/log/summary and /email-track/log/:id.
  • Admin UI: standalone Email Log page + a per-customer Emails view.
  • Licence verification via @huloglobal/vendure-licence-sdk with revocation polling against the HULO licence server.

Ready to ship?

Install in five minutes, run the trial on real traffic, keep it if it earns its place.