Skip to content

Open and click tracking

FrontEngine records when a recipient opens a message and when they click a link. Tracking uses a name under your own domain (for example track.yourdomain.com), and each open or click produces an event delivered to your webhook.

Tracking applies to messages sent with a server credential, through the API or SMTP.

How it works

At delivery time, before DKIM signing, FrontEngine changes each recipient's copy:

  • Links: every href="http://..." or href="https://..." in the HTML part, and every bare URL in the text part, is replaced by an address on your tracking domain. When the recipient clicks, FrontEngine answers with a 307 redirect to the original URL.
  • Opens: an invisible 1x1 pixel image is inserted before </body> in the HTML part. When the mail client loads the image, the open is recorded.

The DKIM signature covers the message after the change, so tracking does not break authentication.

The redirect only follows URLs that FrontEngine stored when it sent the message. An unknown tracking address answers 404. No parameter can point the redirect at another destination.

Text-only messages

An open depends on an image, so it is only recorded for messages with an HTML part. Clicks are recorded in both parts.

Tracking domain

Each server has one tracking domain per sending domain. The default name is track.<your domain>.

  1. Ask support at [email protected] to enable tracking, naming the server and the sending domain.
  2. Create a CNAME record in your DNS for track.<your domain> pointing at the target our team gives you.
  3. Tell support. Our team checks the record and completes the activation.

Until the DNS check of the tracking domain passes, messages from that domain leave exactly as you wrote them, with no rewritten links and no open image.

Automatic certificate

Once the CNAME is verified, FrontEngine obtains a Let's Encrypt certificate for the tracking name and renews it on its own. Rewritten links use https://. You do not generate or install a certificate.

If your domain has a CAA record, it must allow issuance by Let's Encrypt. Otherwise the certificate is not issued and the activation does not complete.

Options

The options below are set per tracking domain. Ask support to change them.

Option Effect
Track clicks Turns link replacement on or off
Track opens Turns the open image on or off
Excluded domains Links to the hosts on this list are not replaced. The comparison is by exact host name

You also control tracking from the message itself:

Control Effect
Header X-AMP: skip Turns tracking off for that message
Link with http+notrack:// or https+notrack:// That link is not replaced. The +notrack marker is removed before sending
{
  "to": ["[email protected]"],
  "from": "[email protected]",
  "subject": "Password reset",
  "html_body": "<p><a href=\"https+notrack://app.yourdomain.com/reset/abc\">Reset password</a></p>",
  "headers": {"X-AMP": "skip"}
}
From: [email protected]
To: [email protected]
Subject: Password reset
X-AMP: skip

Sensitive links

Use +notrack on password reset links, signup confirmations and links carrying a single-use token. The original URL is then not stored for redirection, and the recipient sees the address of your own system.

Events produced

Event When
MessageLoaded The open image was loaded
MessageLinkClicked A tracked link was clicked

Every image load and every click produces an event. The same recipient can produce several.

{
  "event": "MessageLinkClicked",
  "timestamp": 1764331200.0,
  "uuid": "0f8b6a0e-6f0e-4c1c-9d36-6c1f0e3a2b11",
  "payload": {
    "message": {
      "id": 1234,
      "token": "aBcD1234",
      "direction": "outgoing",
      "message_id": "[email protected]",
      "to": "[email protected]",
      "from": "[email protected]",
      "subject": "Your order is confirmed",
      "timestamp": 1764331100.0,
      "spam_status": "NotChecked",
      "tag": "order"
    },
    "url": "https://www.yourdomain.com/orders/1234",
    "token": "xYz987",
    "ip_address": "203.0.113.10",
    "user_agent": "Mozilla/5.0"
  }
}

MessageLoaded has the same shape, without the click's url and token fields.

Webhooks are signed. Check the signature before using the content, as described in Security.

Current limitations

  • The ip_address field of both events is not reliable as the reader's address. Do not use it for geolocation or for security decisions.
  • Events arrive by webhook only. There is no query for open and click history.
  • Tracking is not applied to delivery failure notices generated by the system.

Privacy

  • An open is an estimate. Mail clients that block images produce no event, and services that load images ahead of the reader produce events with no real reading. Use opens as a trend, not as proof of reading.
  • Clicks can be automatic too. Security filters often visit the links of a message before delivering it.
  • Personal data. Recording the opens and clicks of an identified person is processing of personal data. State this practice in your privacy policy and define the appropriate legal basis under the LGPD. FrontEngine acts as the processor of this data on your behalf.
  • Turn it off when you do not need it. For messages with sensitive content, use X-AMP: skip.

Next steps