usend Docs
Sending

Open and click tracking

Track when recipients open your emails and click links.

usend can record when an email is opened and when its links are clicked. Tracking is configured per domain and is off by default.

Turn tracking on

Enable it in the dashboard on the domain's page, or with PATCH /domains/{id}:

Shell
curl -X PATCH https://api.usend.et/domains/d91cd9bd-1176-453e-8fc1-35364d380206 \
  -H "Authorization: Bearer us_123456789" \
  -H "Content-Type: application/json" \
  -d '{ "open_tracking": true, "click_tracking": true }'

The settings apply to every email sent from that domain afterwards, including broadcasts.

Open tracking

With open tracking, usend adds a 1×1 transparent image to the HTML body, just before </body> (or at the end). When the recipient's mail client loads it, usend records an email.opened event with the client's user agent and IP address.

Opens are an estimate. Some clients block images, so real opens are missed, and some privacy features load every image automatically, so opens are recorded that a person never made. Plain-text-only emails can't be tracked.

Click tracking

With click tracking, usend rewrites every http:// and https:// link in <a href="..."> tags of the HTML body to go through usend's tracking host first. A click records an email.clicked event with the original link, the user agent and the IP address, then redirects to the original URL.

Links that are not rewritten:

  • Non-HTTP links, such as mailto: and tel:.
  • Unsubscribe links generated by usend.
  • Links marked with a data-usend-notrack attribute placed before href:
HTML
<a data-usend-notrack href="https://acme.com/account/reset?token=abc">Reset your password</a>
Tip

Exclude links that carry secrets, such as password reset or sign-in links, so the tokens are not routed through a redirect.

Events

Every open and click is recorded, so one email can produce several email.opened and email.clicked events. Subscribe to them with webhooks. See Event types for the payloads.