Newsletter Management: Tracking and statistics
Newsletter tracking in three modes (off, anonymous, personal with consent), statistics dashboard, per-newsletter numbers and data retention with cleanup commands for Sylius
Newsletter Management: Tracking and statistics
This documentation always describes the latest published version.
This page explains what the plugin measures about opens and clicks, where you see the numbers and how long which data is kept. Sending itself is covered on Composing and sending.
Tracking modes
You set tracking per channel: admin sidebar, MMKreativ Plugins, Newsletter management, field Tracking in the settings form. The default is Off.
| Mode | What is measured | What is stored |
|---|---|---|
| Off | Nothing. No pixel and no link rewriting. | Nothing |
| Anonymous (counters only) | Opens and clicks as counters per newsletter, link and day | One row per newsletter, day and target holding a number. No recipient, no IP, no cookie, no time finer than the day. |
| Personal, with the subscriber's consent | The same counters for everybody, plus individual opens and clicks, but only for subscribers who agreed with their own, optional checkbox | Additionally per event: subscription, type (open or click), link and time. No IP, no user agent, no cookie. |
Even anonymous tracking has to be named in your privacy policy. Personal tracking all the more, where the subscribers' consent comes on top.
How it works
Tracking only applies to a real send, never to a preview or a test mail.
graph TD
A["Sending starts"] --> B["Store the HTML links in the link table"]
B --> C["Per mail: replace links with tracking URLs"]
C --> D["Append an invisible pixel"]
D --> E["Recipient opens the mail"]
D --> F["Recipient clicks a link"]
E --> G["Pixel request counts one open"]
F --> H["Click counts, redirect to the stored URL"]
- Clicks: When sending starts, the literal
http(s)links of the HTML are stored in a link table (code, URL). In every mail the plugin replaces them with an address on your shop (/newsletter/track/click/...) that counts the click and redirects to the stored URL. The request carries only a short code and a signature, never the target, so the route is not an open redirect. Placeholder links (manage and unsubscribe links),mailto:,tel:and anchors are left alone. - Opens: An invisible 1x1 pixel (
/newsletter/track/open/...) is requested when the mail is loaded and counts one open. - Signatures: All tracking addresses are signed with an HMAC-SHA256 over your application's
kernel.secret. That does not make a hit trustworthy, but it stops anyone from probing the routes for newsletter IDs or link codes that were never sent to them. An invalid signature results in a 404. - Tracking switched off: A mail already in an inbox keeps redirecting after you switch tracking off. It just stops counting.
- Unsubscribes: The unsubscribe link of every real newsletter mail carries the newsletter ID with a signature. An unsubscribe made through that link can therefore be attributed to the newsletter and counted, regardless of the tracking mode. The attribution names only the newsletter, never the subscriber.
Personal tracking in detail
- The consent checkbox sits in the signup form and on the page where subscribers manage their subscription, separate from the newsletter consent. Leaving it unticked costs nothing. The field only appears when the channel runs in personal mode.
- The wording is the plugin's default text or your own text in the field Wording of the tracking consent checkbox.
- With every consent the plugin stores the moment and the exact wording on the subscription as evidence. On the subscriber's admin page you see both, plus their activity.
- The mail of a consenting subscriber carries a signed recipient marker (
randrs) in its tracking URLs. Everybody else gets anonymous URLs. A forged marker, a consent withdrawn since, or a channel set back to another mode just counts anonymously. - Individual events are deleted when the subscriber withdraws consent (manage page or API), when they unsubscribe, when the subscription is deleted, and after the retention period (see below).
Honest limits of the numbers
Anonymous opens and clicks are counters, not unique people. Someone who opens a mail three times counts three times. The values per delivery can therefore exceed 100 % and are not open or click rates in the usual sense.
- Opens are an indication. Mail programs and privacy proxies sometimes load the pixel on their own, and other programs block images and never trigger the open.
- Personal rates apply to the consenting group only. Opened and Clicked count unique subscribers, relative to the recipients with consent, not to everyone.
- Forwarded mails: A forwarded mail carries the original recipient's marker, so opens by the person it was forwarded to are attributed to the forwarder.
- Delivery and unsubscribe numbers are exact, even if tracking was off.
Statistics in the admin
Statistics dashboard
You open the dashboard with the Statistics button in the title bar of the newsletter settings. At the top you choose All channels or a single channel.
| Section | Content |
|---|---|
| Key figures | Number of confirmed, pending and unsubscribed subscribers, and the confirmation rate: the share of signups that were ever confirmed (double opt-in) |
| Subscribers over time | Last 12 months, per month: new signups, confirmed, unsubscribed and net growth (confirmed minus unsubscribed) |
| Latest newsletters | The last ten newsletters that are sending or were sent (status Sending, Sent or Cancelled) with Delivered (of recipients), Failed, Unsubscribes, Opens and Clicks |
The table only shows opens and clicks for newsletters sent with tracking switched on. A dash means nothing was measured.
Numbers per newsletter
Once sending has started, a newsletter's detail page shows a Statistics section:
- Delivery: Delivered (of all recipients), Failed, Skipped, Unsubscribes. These numbers are exact.
- With tracking: Opens and clicks as totals and as a percentage per delivery, By day as a time series, and the Most clicked links with click counts.
- Without tracking: A note that tracking was off when this newsletter was sent.
- With consent (personal mode): Recipients with consent, Opened (unique) and Clicked (unique) with the rate within that group, plus a table of opens, clicks and last activity per recipient (the first 100, most recently active first).
Data retention
Two cleanup commands delete old data. Both belong in a daily cron job.
15 3 * * * cd /path/to/shop && php bin/console mmd:newsletter:subscription:purge
20 3 * * * cd /path/to/shop && php bin/console mmd:newsletter:tracking:purge
You set the retention periods per channel in the newsletter settings:
| Setting | Default | Allowed | Deleted by |
|---|---|---|---|
| Keep unsubscribed subscriptions for (days) | 1095 (3 years) | 30 to 3650 | mmd:newsletter:subscription:purge |
| Keep unconfirmed signups for (days) | 30 | 7 to 365 | mmd:newsletter:subscription:purge |
| Keep tracking counters for (days) | 365 | 30 to 3650 | mmd:newsletter:tracking:purge |
| Keep personal tracking events for (days) | 90 | 7 to 730 | mmd:newsletter:tracking:purge |
| Command | Option | Effect | |
| --- | --- | --- | |
mmd:newsletter:subscription:purge |
--older-than=<days> |
Overrides both retention periods for every channel. Must be a positive number. | |
mmd:newsletter:tracking:purge |
--older-than=<days> |
Overrides both retention periods for every channel. Must be a positive number. |
What is deleted and what is not:
- Unsubscribed subscriptions are kept after the unsubscribe as evidence of the original consent, in case someone later asks whether it existed. That reason does not last forever, so the command deletes them after the configured period, counted from the unsubscribe. The default of 3 years follows the regular German civil-law limitation period (sections 195 and 199 BGB). Adjust it if your legal advice says otherwise.
- Unconfirmed signups (double opt-in link never followed) hold no consent, so there is nothing to keep as evidence. The command deletes them after the configured period, counted from the signup. A new signup restarts the clock.
- Confirmed subscriptions are never touched by the command, however old they are.
- Tracking counters and events are deleted by
mmd:newsletter:tracking:purgeper channel after the respective period, for the newsletters of that channel. - The delivery log is not touched by any command. It is the record of what was sent and keeps its own copy of the address even after the matching subscription was deleted.
- A subscription whose channel has since been deleted has no settings to take a period from. The command leaves it alone.